liveBook · Manning

Discretization

Discretization is the process of mapping values or observations into a finite set of discrete intervals or categories.

How 5 Manning books explain it

Financial AI in Practice

Binning is the technique of grouping continuous or categorical values into discrete intervals or categories.

How it is used
Makes credit-score inputs more interpretable and less sensitive to noise and outliers while supporting auditable lending decisions.
How deep it goes
Explains granularity trade-offs and special-value handling, then demonstrates manual quantile binning and constrained automated selection.
Examples
Uses age intervals, ten-bin `pd.qcut` numeric features, and a chart of bin counts and default rates.
What you can do after
Apply it via pandas `pd.qcut` or OptBinning `BinningProcess`, then inspect event rates, special bins, and selected features.

Read how Financial AI in Practice explains discretization →

Outlier Detection in Python

Binning is the process of assigning continuous or otherwise detailed values to discrete intervals or categories.

How it is used
Prepares numeric or date values for outlier detectors that require categorical inputs or use histograms.
How deep it goes
Compares equal-width and equal-count methods, their uses, and sensitivity to extreme values and bin count.
Examples
Uses staff expense dates, times, and amounts, plus uniform data with outliers, to demonstrate binning choices.
What you can do after
Apply equal-width or equal-count bins while accounting for the detection task and possible effects of extreme values.

Read how Outlier Detection in Python explains discretization →

Grokking Machine Learning

Binning is a technique that partitions numerical values into intervals or buckets so they can be represented as categorical groups.

How it is used
Groups numerical features into categories when they may be more useful to a model as categorical features.
How deep it goes
Defines binning as splitting values into buckets and demonstrates Pandas interval creation, without evaluating bin choices.
Examples
Uses Titanic passenger ages and decade-wide intervals from 0 to 80 as the concrete example.
What you can do after
Apply it via Pandas `cut` to replace passenger ages with decade-based categorical intervals.

Read how Grokking Machine Learning explains discretization →

Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI

A technique that groups numeric values into discrete ordered bins and assigns each value to a bin.

How it is used
Accelerates decision-tree and gradient-boosting split search, and supports categorical transformations for exploratory association analysis.
How deep it goes
Explains ordered integer bins, threshold evaluation, Gini scoring, and histogram speedups without developing the complete XGBoost split algorithm.
Examples
Uses latitude thresholds, Airbnb price deciles, MPG deciles, and a 256-bin histogram implementation.
What you can do after
Apply it via NumPy histogram operations to reduce split candidates or discretize numeric variables for classification and association analysis.

Read how Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI explains discretization →

Grokking Statistics

Binning is the process of grouping continuous or discrete observations into intervals and summarizing each interval.

How it is used
Creates interval-level counts when raw records do not provide a usable dependent variable for correlation or regression.
How deep it goes
Demonstrates interval construction and counting, then stops short of endorsing linear analysis when outliers violate assumptions.
Examples
Uses airplane bird-strike records grouped into 100-foot altitude intervals and plotted against incident counts.
What you can do after
Apply it via pandas to create intervals, count observations, visualize the result, and question subsequent model choices.

Read how Grokking Statistics explains discretization →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.