P62Feature EngineeringIntermediateChoose12 min

Choose an Encoding Strategy for a High-Cardinality Category

Choose encoding for a category with many values.

#choose#encoding#high-cardinality

Scenario

merchant_id has 18,000 values and new merchants each week.

Problem statement

Recommend an encoding with trade-offs.

Your Task

  1. Address cardinality.
  2. Handle unseen values.
  3. Address leakage.

Related Concepts

One-hotTarget encoding

Ready to count this problem?

Mark it complete when you have reasoned through the solution in your own words.