Session Ready
Exercise

Features with low variance

In the previous exercise you established that 0.001 is a good threshold to filter out low variance features in head_df after normalization. Now use the VarianceThreshold feature selector to remove these features.

Instructions
100 XP
  • Create the variance threshold selector with a threshold of 0.001.
  • Normalize the head_df dataframe by dividing it by its mean values and fit the selector.
  • Create a boolean mask from the selector using .get_support().
  • Create a reduced dataframe by passing the mask to the .loc[] method.