What is the purpose of feature scaling in machine learning?
A
To reduce the number of features
B
To convert categorical data into numbers
C
To ensure features contribute equally to model training
Analysis & Theory
Feature scaling ensures that features are on a similar scale so that no feature dominates the others.
Which of the following techniques rescales data to a fixed range, usually [0, 1]?
Analysis & Theory
Min-Max scaling transforms features to a range, typically [0, 1].
What does standardization (Z-score scaling) do?
A
Scales features to a range between -1 and 1
B
Centers the feature around the mean with unit variance
D
Converts text to numbers
Analysis & Theory
Standardization transforms data to have a mean of 0 and a standard deviation of 1.
Which scikit-learn class is used for Min-Max scaling?
Analysis & Theory
`MinMaxScaler` scales features to a specified range, usually [0, 1].
Which scaling technique is best when data contains outliers?
Analysis & Theory
`RobustScaler` uses median and IQR, making it more robust to outliers.
Why is scaling important for distance-based algorithms like KNN and K-Means?
B
They use categorical outputs
C
They rely on raw data ranges
D
They use distance measures that are affected by feature scales
Analysis & Theory
Distance-based algorithms are sensitive to feature magnitude, so scaling is crucial.
What happens if features are not scaled in gradient descent-based models?
A
The model will always be accurate
B
Training may be slow or diverge
C
The features will be removed
D
All weights will become equal
Analysis & Theory
Unscaled features can cause slow convergence or unstable learning in gradient descent.
Which of the following is NOT a feature scaling technique?
Analysis & Theory
One-hot encoding is used for categorical variables, not for feature scaling.
What is the formula for Min-Max scaling?
B
(X - min) / (max - min)
Analysis & Theory
Min-Max scaling rescales data using: (X - min) / (max - min).
In which type of dataset is `StandardScaler` most effective?
A
When features have a Gaussian (normal) distribution
B
When features are strings
C
When features are binary
D
When features contain a lot of NaN values
Analysis & Theory
`StandardScaler` works best when features are normally distributed.