Skip to content
AI360XpertBeta
Glossary
Definition

Standardization

Rescaling a column by subtracting its mean and dividing by its standard deviation, so it ends up centred at 0 with unit spread.

Think of It Like This

Like converting different school grading curves to a zero-centered bell curve so an 85 in physics is directly comparable to a 92 in history.

Written z=(x−μ)/σz = (x - \mu)/\sigma, where μ\mu is the mean and σ\sigma the standard deviation. The output is unbounded, unlike min-max scaling, and it's the default choice for anything that computes a distance, a dot product, or a penalty across columns.

The mean and standard deviation are fitted — learned from rows — which is the part that causes bugs. Fit them on all your data before splitting and the held-out rows have been scaled using knowledge of themselves, so persist the two numbers with the model artefact and never recompute them at serving.

One trap on sparse data: subtracting a mean turns every stored zero into a non-zero, destroying sparsity and often the available memory with it. Use with_mean=False or scale by the maximum absolute value instead.