liveBook · Manning

Equal-frequency binning

As explained in Outlier Detection in Python

Equal-count binning divides ordered observations into intervals containing approximately the same number of observations.

Equal-frequency binning divides ordered observations into intervals containing approximately the same number of observations. It is generally preferred for multivariate outlier detection, where rare combinations matter more than isolated univariate extremes. section 9.6

Unlike equal-width binning, equal-frequency binning reduces the distortion caused by extreme values spanning a wide numeric range. The binning method and the chosen number of bins still affect which observations appear rare. section 9.6 section 9.8

Choosing a bin count

Uniform data with values 3.0 and 100.0 demonstrates how bin choices can hide or expose unusual values; PyOD provides get_optimal_n_bins as a bin-count utility. section 9.6

How Outlier Detection in Python covers it

How deep it goes
Explains the equal-width trade-off, multivariate assumption, outlier sensitivity, and bin-count effects, but does not detail construction steps.
Examples
Uses uniform data with extreme values, comparative histograms, and PyOD’s get_optimal_n_bins utility.
What it assumes
Assumes that univariate outliers are tested separately before analyzing rare multivariate combinations.
What you can do after
Apply equal-count binning to multivariate outlier detection while checking bin count and separating it from univariate screening.
How it connects
Connects equal-frequency binning to histograms, multivariate outlier detection, equal-width binning, and categorical outlier detection.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Outlier Detection in Python. The section links point to the parts of the book it draws on.