Skip to content
← All questions

How do you use the Min-Max formula to scale data into the range from 0 to 1?

Min-Max normalization is a method that linearly transforms raw data into the interval [0, 1]. The formula is X′=X−min⁡max⁡−min⁡X' = \frac{X - \min}{\max - \min}, where XX is the original value, and min⁡\min and max⁡\max are the minimum and maximum values of that feature column, respectively.

Conditions

  • The dataset has clear min and max values.
  • max is not equal to min

Reasoning, step by step

  1. Identify the original value XX you want to normalize.
  2. Determine the minimum value min⁡\min and maximum value max⁡\max of the feature column.
  3. Substitute these values into the formula X′=X−min⁡max⁡−min⁡X' = \frac{X - \min}{\max - \min}.
  4. Calculate the result to get the normalized value X′X', which will fall within the interval [0, 1].

Example

For a house area of 1200, with a column minimum of 1000 and maximum of 1800, the calculation is 1200−10001800−1000=200800=0.25\frac{1200 - 1000}{1800 - 1000} = \frac{200}{800} = 0.25.

Common misconceptions

  • Assuming that one can directly train machine learning models using raw large-valued features without worrying about the impact of numerical scale.

Watch the explanation

Explore next

Answers are generated from source material and independently checked. Consult the original video or creator if something is unclear.