How do uniform, quantile and kmeans binning choose different boundaries for a skewed feature?
Classic MLLevel: IntermediateDiscretization strategies
How do uniform, quantile and kmeans binning choose different boundaries for a skewed feature?
Hints
- Equal width is not equal occupancy.
- A clustering rule introduces a third objective.
Answer
Uniform uses equal-width intervals, quantile aims at similar sample counts, and kmeans forms one-dimensional clusters. They preserve different aspects of the distribution and need validation.
Source and licence: scikit-learn 1.7.2 — preprocessing · BSD-3-Clause · answer: Quantoros editorial