1. Learn
  2. /
  3. Courses
  4. /
  5. Feature Engineering in R

Connected

Exercise

Normalizing and log-transforming

You are handed a dataset, attrition_num with numerical data about employees who left the company. Features include Age, DistanceFromHome, and MonthlyRate.

You want to use this data to build a model that can predict if an employee is likely to stay, denoted by Attrition, a binary variable coded as a factor. In preparation for modeling, you want to reduce possible skewness and prevent some variables from outweighing others due to variations in scale.

The attrition_numdata and the trainand test splits are loaded for you.

Instructions

100 XP
  • Normalize all numeric predictors.
  • Log-transform all numeric features, with an offset of one.