1. Learn
  2. /
  3. Courses
  4. /
  5. Feature Engineering for Machine Learning in Python

Exercise

Standardization

While normalization can be useful for scaling a column between two data points, it is hard to compare two scaled columns if even one of them is overly affected by outliers. One commonly used solution to this is called standardization, where instead of having a strict upper and lower bound, you center the data around its mean, and calculate the number of standard deviations away from mean each data point is.

Instructions

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