What is StandardScaler?

Updated May 17, 2026

Short answer

StandardScaler standardizes features by removing mean and scaling to unit variance.

Deep explanation

It transforms data so each feature has zero mean and unit variance, improving convergence for many algorithms.

Real-world example

Used in logistic regression for medical predictions.

Common mistakes

  • Applying scaling before train-test split.

Follow-up questions

  • When not to use scaling?
  • Difference from MinMaxScaler?

More Scikit-Learn interview questions

View all →