EasyDeepLearn

When is discretization (binning) a useful feature transformation?

medium

Answer

  • Binning turns a continuous feature into categorical buckets — great when (1) the relationship with y is highly non-linear and non-monotonic, so a linear model can't capture it; (2) you want to expose interactions between binned features cleanly; (3) domain knowledge suggests thresholds (age < 18, 18-65, > 65).
  • Trees don't benefit — they discretize on their own.
  • Choose bins by equal-width, equal-frequency, or supervised (decision-tree-based binning that maximizes mutual information with y).
Check yourself — multiple choice
  • Binning always hurts model quality
  • Useful for linear models with non-monotonic relationships; unnecessary for trees
  • Only for categorical features
  • Binning is a form of one-hot encoding

Binning: helps linear models with non-monotonic relationships; trees don't need it.

#feature-engineering#features

Practise Supervised Learning

215 interview questions in this topic.

Related questions