Equal-Width Binning

Turkish equivalent: Eşit Genişlikli SınıflamaDomain: Machine Learning

A discretization method dividing a numeric range into equally wide intervals without enforcing equal counts.

Equal-width binning partitions a chosen numeric range into k intervals of identical length. With lower bound a and upper bound b:

h = (b − a)/k
edge_i = a + i×h    (i=0,…,k)

For a=0, b=100 and five bins, the edges are 0,20,40,60,80,100, giving width 20. The ownership of a boundary observation must be explicit: [0,20) and [20,40) cannot both include 20.

Equal widths do not imply equal counts

If most observations lie between 0 and 20, the first interval may be crowded while others are empty. That is the central distinction from quantile binning, which attempts to balance the number of observations.

Outliers can greatly expand boundaries derived from the sample minimum and maximum, compressing the central mass into very few bins. Fixed engineering limits or domain-specific cutoffs may be more interpretable than sample-dependent endpoints.

Stable bins support comparison

Keeping edges fixed makes histograms from different days directly comparable. Recomputing min–max edges every day gives the same bin identifier a different numeric meaning. When used as machine-learning preprocessing, learned edges should be fitted on the training sample and frozen for the test data. A statistical histogram visualizes the resulting interval frequencies.