Categorical variables with lot many levels


How to deal with categorical variables with lot many levels post cod apart from techniques such as dummy coding and One hot coding


Hi @praveen,

There are multiple ways to deal with high cardinality categorical variables.

  1. Delete rare categories from the data.
  2. Convert the categories to frequencies which is nothing but a count of each category.
  3. Convert each category to it’s mean response to target.

Ankit Gupta