Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to import the StandardScaler from scikit-learn.
ML Python
from sklearn.preprocessing import [1]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to create a MinMaxScaler instance.
ML Python
scaler = [1]() Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to fit the scaler to the data array X.
ML Python
scaler.[1](X) Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to scale the data X using fit and transform methods.
ML Python
scaler.[1](X) X_scaled = scaler.[2](X)
Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to create a StandardScaler, fit it on training data, and transform test data.
ML Python
scaler = [1]() scaler.[2](X_train) X_test_scaled = scaler.[3](X_test)
Drag options to blanks, or click blank then click option'
Attempts:
3 left