Complete the code to import the StandardScaler from scikit-learn.
from sklearn.preprocessing import [1]
The StandardScaler is imported from sklearn.preprocessing to scale features by removing the mean and scaling to unit variance.
Complete the code to create a MinMaxScaler instance.
scaler = [1]()The MinMaxScaler scales features to a given range, usually between 0 and 1.
Fix the error in the code to fit the scaler to the data array X.
scaler.[1](X)The fit method computes the mean and std (for StandardScaler) or min and max (for MinMaxScaler) from the data.
Fill both blanks to scale the data X using fit and transform methods.
scaler.[1](X) X_scaled = scaler.[2](X)
To scale using separate steps: first fit the scaler on data to learn parameters, then transform the data.
Fill all three blanks to create a StandardScaler, fit it on training data, and transform test data.
scaler = [1]() scaler.[2](X_train) X_test_scaled = scaler.[3](X_test)
First, create a StandardScaler instance. Then fit it on training data to learn scaling parameters. Finally, transform the test data using those parameters.
