What transformation does StandardScaler apply to each feature?
Correct answer
C. Subtracts the mean and divides by the standard deviation
15 views
C. Subtracts the mean and divides by the standard deviation
15 views
StandardScaler centres each column on zero and scales it to unit variance using the mean and standard deviation learned during fit, giving a z-score. MinMaxScaler is the alternative that maps values into a fixed 0 to 1 range, which preserves the shape but is sensitive to outliers. Standardisation matters for distance-based and regularised models such as k-nearest neighbours, SVMs and logistic regression with penalties.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is C? Ask here and get an explanation.