How does cluster-centroid undersampling compress the majority class compared to random undersampling?
Last updated
It runs k-means on the majority class with k equal to the target size, then keeps the centroids (
voting='soft') or the real sample nearest each centroid (voting='hard').Unlike random undersampling, every majority region gets a representative (rare sub-modes aren't lost), and results vary less across seeds.
Caveats: soft centroids are synthetic averages that shrink variance and suit categorical or sparse data poorly. Density information is also lost, and k-means is costly and scale-sensitive.