Discretization
Discretization is the process of mapping values or observations into a finite set of discrete intervals or categories.
Financial AI in Practice
Binning is the technique of grouping continuous or categorical values into discrete intervals or categories.
- How it is used
- Supports interpretable, stable credit scorecards by grouping borrower features before scoring.
- How deep it goes
- Contrasts fine and coarse classing, then demonstrates manual quantile binning and automated feature selection with inspection checks.
- Examples
- Uses age bands, ten-quantile numeric bins, and a credit feature’s default-rate plot to illustrate grouping and inspection.
- What you can do after
- Apply it via OptBinning to fit feature bins, select variables, and inspect risk patterns.
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.
Also covered in
- Privacy-Preserving Machine Learning
- Causal Inference for Data Science
- Time Series Forecasting Using Foundation Models
- The Well-Grounded Data Analyst
- Ensemble Methods for Machine Learning
What to know first
- categorical dataCategorical data consists of values representing membership in discrete categories rather than measured numerical magnitudes.
- missing valueA missing value is an expected data value or observation that is absent, unavailable, unknown, or inapplicable.
- gradient boostingGradient boosting is an ensemble-learning technique that sequentially adds predictive models fitted to reduce a loss by following its gradient.
- data explorationData exploration is the systematic examination and summarization of data to understand its structure, distributions, relationships, patterns, anomalies, and quality.
Related concepts
- equal-width binningincludes · Equal-width binning is a discretization technique that partitions a numerical range into intervals of identical width.
- bucketuses · A bucket is a logical grouping or container that holds items assigned to it by a storage, partitioning, or classification scheme.
- Chronosused by · Chronos is a foundation model and framework for probabilistic time-series forecasting that adapts language-model methods to temporal data.
Questions about discretization
What is discretization?
Discretization is the process of mapping values or observations into a finite set of discrete intervals or categories.
Which Manning books explain discretization?
Financial AI in Practice, Outlier Detection in Python, Grokking Machine Learning, Machine Learning for Tabular Data: XGBoost, Deep Learning, and AI and Grokking Statistics.
What should I know before learning discretization?
Manning books that teach discretization usually introduce categorical data, missing value, gradient boosting and data exploration first.
What kinds of discretization are there?
Kinds of discretization include supervised discretization, unsupervised discretization and equal-width binning.
What is discretization also called?
Discretization is also called binning.
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.




