Normalization › Visual Example
Michael BrenndoerferMay 19, 20255 min read
Machine Learning from ScratchAll chapters Part 3 of 9Foundations
Normalization › Visual ExampleOne section · Sections in this chapter4 / 10 ↓
Sections in this chapter10
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
This example demonstrates how normalization maps features with different ranges into a common [0, 1] scale:
Out[2]:
Visualization

Original data: Age - Min: 25 Max: 75 Income - Min: 30000 Max: 130000 Normalized data: Age - Min: 0.0 Max: 1.0 Income - Min: 0.0 Max: 1.0
Example: Step-by-Step Calculation
Let's work through a detailed example with two features:
x1: age in years → [25, 35, 45, 55, 65, 75]x2: income in thousands → [30, 50, 70, 90, 110, 130]
Step 1: Calculate min and max values
- ,
- ,
Step 2: Apply normalization formula
For the first feature ():
For the second feature ():
Result: Both features are now on the same [0, 1] scale:
x1: [25, 35, 45, 55, 65, 75] → [0.000, 0.200, 0.400, 0.600, 0.800, 1.000]x2: [30, 50, 70, 90, 110, 130] → [0.000, 0.200, 0.400, 0.600, 0.800, 1.000]