Session Ready
Exercise

Crossing two categorical features

Feature crossing is a very useful technique that helps algorithms take into account relationships between features in your data set. Using the adult_incomes data set, perform a feature cross between gender and occupation.

Instructions
100 XP
  • Create a feature cross between gender and occupation using the dummyVars() function from caret.
  • Use predict() to output your resulting data frame.
  • Summarize the resulting output.