Course map
Stage 1: Foundations
Stage 2: Machine Learning
Stage 3: Deep Learning
Stage 4: LLMs & Generative AI
Stage 5: Production & Specialization

Part 04 / Topic 5 of 6

Feature scaling

The example above standardized its features before training — the Part 1 broadcasting one-liner. That is not cosmetic. Gradient descent uses one learning rate for every parameter; if one feature spans 20–150 and another 0–1, their gradients differ by orders of magnitude, and no single learning rate suits both — small enough to be stable on the big feature means painfully slow on the small one.

Scale first (mean 0, std 1 per column) and the loss surface becomes round instead of a narrow valley; one learning rate works for all directions. Rule: any model trained by gradient descent gets scaled inputs — that includes every neural network in Stage 3. Tree models (Part 5) are the notable exception; they split on thresholds and do not care about scale.

🧪 Quick quiz

  1. Why does gradient descent need scaled features?
Show the answer

One learning rate serves all parameters. With features on wildly different ranges, gradients differ by orders of magnitude and no single rate is stable for one feature yet fast for another. Standardizing makes one rate work everywhere.

Done here? The practice set for Part 4 — 4 exercises with solutions — is on the part page.

Search the guide