Min-Max Normalization
Transform values into a consistent range while preserving their order.
Min-Max Normalization explained visually
Scale Laila's exam score between zero and one, then apply the same idea to practical features.
What you will learn
Diagnose underfitting, understand bias and variance, and prepare features with normalization.
Use the minimum and maximum
Min-max normalization subtracts the minimum value and divides by the full range between the maximum and minimum.
Map values between zero and one
The minimum becomes zero, the maximum becomes one, and values between them keep their relative order.
Apply it consistently
Store the minimum and maximum from training data and reuse them when processing validation, test, and production inputs.
Watch for outliers
One extreme value can stretch the range and compress most ordinary observations into a narrow area.
Quick check: test your understanding
What does the minimum become?
Zero.
What does the maximum become?
One.
Why can an outlier cause trouble?
It can stretch the range and compress ordinary values.
Accessible referenceLesson 26 transcript379 words · Matches the published narration and captionsOpen transcript
In the previous lesson, we learned why neural networks work more effectively when their input features use consistent numerical scales. Now Laila will apply one of the most common scaling methods: min-max normalization. Imagine Laila and five classmates completing the same exam. Their scores are eighty-five, ninety-two, seventy-eight, ninety-six, eighty-eight, and seventy-two.
Laila scored eighty-five. The values already use the same unit, but we want to transform every score into a scale from zero to one. Min-max normalization uses the smallest and largest values in the dataset. The normalized value equals the original value minus the minimum, divided by the maximum minus the minimum.
The lowest score in Laila's class is seventy-two, and the highest is ninety-six. To normalize Laila's score of eighty-five, we first subtract the minimum. Eighty-five minus seventy-two equals thirteen. Next, we calculate the complete range. Ninety-six minus seventy-two equals twenty-four. Finally, we divide thirteen by twenty-four.
Laila's normalized score is approximately zero point five four two. The student who scored seventy-two receives a normalized value of zero because the score equals the minimum. The student who scored ninety-six receives a value of one because the score covers the complete range. Every other score falls proportionally between zero and one.
The ranking has not changed. Higher original scores still produce higher normalized scores, and the relative differences are preserved through this linear transformation. This method becomes especially useful when different features use different units. For example, a health model might receive age in years, weight in kilograms, and laboratory measurements using much larger or smaller ranges. Min-max normalization can bring these features into a consistent interval.
However, Laila must watch for extreme values. Suppose an exam score is accidentally recorded as nine hundred and sixty instead of ninety-six. That incorrect maximum would compress every normal score into a very small portion of the scale. This is why production systems need data validation as well as normalization.
Laila must also calculate the minimum and maximum using only the training data. Validation, test, and future production examples must use those same stored values. Min-max normalization gives us a fixed and intuitive range. But sometimes we care more about how far a value lies above or below the typical value. For that, we use z-score normalization in Lesson 27.