Question: 1 ) from sklearn.preprocessing import MinMaxScaler 2 ) normalization = MinMaxScaler ( ) 3 ) x _ scaled = normalization.fit ( X _ train )

1)from sklearn.preprocessing import MinMaxScaler
2)normalization = MinMaxScaler()
3)x_scaled = normalization.fit(X_train)
4)x_train_normalized = x_scaled.transform(X_train)
5)x_test_normalized = x_scaled.transform(X_test)
6)y_scaled = normalization.fit(Y_train.reshape(len(Y_train),1))
7)y_train_normalized = y_scaled.transform(Y_train.reshape(len(Y_train),1)).flatten()
8)y_test_normalized = y_scaled.transform(Y_test.reshape(len(Y_test),1)).flatten()
Which of the following sentences is incorrect?
Group of answer choices
In line 6, we store the information about the scaling transformation on the label in the variable y_scaled.
In line 4, we normalize the training set by subtracting its minimum value and dividing by the range length.
In line 3, we store the information about the scaling transformation on the feature in the variable x_scaled.
In line 5, we normalize the test set by subtracting its minimum value and dividing by the range length.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!