Exercise

Normalization

As discussed in the video, in normalization you linearly scale the entire column between 0 and 1, with 0 corresponding with the lowest value in the column, and 1 with the largest.
When using scikit-learn (the most commonly used machine learning library in Python) you can use a MinMaxScaler to apply normalization. (It is called this as it scales your values between a minimum and maximum value.)

Instructions

100 XP
  • Import MinMaxScaler from sklearn's preprocessing module.
  • Instantiate the MinMaxScaler() as MM_scaler.
  • Fit the MinMaxScaler on the Age column of so_numeric_df.
  • Transform the same column with the scaler you just fit.