🧮  Normalize (in Feature Engineering)

Normalize (in Feature Engineering)#

Rescaling features to a common range or distribution.

Important

✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.

What it is#

Normalizing (feature scaling) rescales numeric features to a comparable range so that features with large magnitudes don’t dominate the ones with small magnitudes. It changes a feature’s range, not its data type.

The two workhorses#

Min-max scaling maps values to [0, 1]; standardization (Z-score) centers to mean 0, standard deviation 1:

\[x' = \frac{x - \min(x)}{\max(x) - \min(x)} \quad\text{(min-max)}, \qquad x' = \frac{x - \mu}{\sigma} \quad\text{(Z-score)}.\]

Min-max suits bounded data; Z-score suits Gaussian-ish data and methods like PCA. Min-max is outlier-sensitive, so robust scaling (median and IQR) is used when outliers are present.

When and when not#

Normalize for scale-sensitive models (KNN, SVM, neural nets); it speeds convergence and prevents large-value bias. Don’t normalize one-hot or categorical columns (they’re already 0/1 and it destroys their meaning), and fit the scaler on the training set only to avoid leakage.


Theme: Data Preparation & Features  ·  All terminology



See also

Source article Adapted (context, re-expressed) in our own words from: Normalize (in Feature Engineering) (insightful-data-lab.com).

Tags: purpose: reference topic: terminology level: intermediate