Challenge - 5 Problems
Feature Scaling Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Why use StandardScaler instead of MinMaxScaler?
Imagine you have a dataset with features measured in very different units, like height in centimeters and income in dollars. You want to prepare the data for a machine learning model.
Why might you choose StandardScaler over MinMaxScaler?
Attempts:
2 left
❓ Predict Output
intermediate1:30remaining
Output of scaling with MinMaxScaler
What is the output of the following code?
ML Python
from sklearn.preprocessing import MinMaxScaler import numpy as np X = np.array([[1], [2], [3], [4], [5]]) scaler = MinMaxScaler() X_scaled = scaler.fit_transform(X) print(X_scaled.flatten())
Attempts:
2 left
❓ Metrics
advanced1:30remaining
Effect of StandardScaler on mean and variance
After applying StandardScaler to a feature column, what will be the approximate mean and variance of the transformed data?
Attempts:
2 left
🔧 Debug
advanced2:00remaining
Why does this scaling code raise an error?
Consider this code snippet:
from sklearn.preprocessing import StandardScaler import numpy as np X = np.array([1, 2, 3, 4, 5]) scaler = StandardScaler() X_scaled = scaler.fit_transform(X) print(X_scaled)
Why does this code raise an error?
Attempts:
2 left
❓ Model Choice
expert2:00remaining
Choosing scaler for neural network input
You are training a neural network on image pixel data with values from 0 to 255. Which scaler is the best choice to preprocess the input pixels before training?
Attempts:
2 left