Out-of-distribution
Out-of-distribution describes data or inputs whose generating distribution differs materially from the distribution represented in a model’s training data.
Outlier Detection in Python
Data containing observations whose distribution differs from the distribution represented by a model's training data.
- How it is used
- Supports image outlier detection so systems can respond cautiously to objects unlike those seen during training.
- How deep it goes
- Defines the distinction through global and local outliers and discusses image-testing assumptions, without specifying a dedicated OOD detector.
- Examples
- Contrasts a parrot with an unusually photographed dog, and compares bird images drawn from different collections.
- What you can do after
- Evaluate/understand it by separating unfamiliar object types from unusual familiar instances and questioning whether a changed data source establishes OOD status.
Read how Outlier Detection in Python explains out-of-distribution →
Natural Language Processing in Action, Second Edition
An out-of-distribution example is an input whose relevant data-generating conditions differ from those represented in a model's training distribution.
- How it is used
- Frames unseen names as a practical test of whether language models can generalize beyond memorized examples.
- How deep it goes
- Defines the distribution shift, demonstrates its consequence, and stops short of formal distributional analysis.
- Examples
- Uses original names such as Carlana and Cason, plus character-feature vectors produced by TfidfVectorizer.
- What you can do after
- Build character n-gram features that let a model represent names absent from its training examples.
Read how Natural Language Processing in Action, Second Edition explains out-of-distribution →
Related concepts
- anomalykind of · An anomaly is an observation, behavior, or state that deviates from an expected or typical pattern or condition.
- generalizationaddressed by · Generalization is the extension of a pattern, model, solution, or conclusion beyond the specific examples or cases from which it was derived.
- training datasetcontrasts with · A collection of examples or observations supplied to a learning procedure to fit or adapt a model or learn its patterns or parameters.
- local outliercontrasts with · A local outlier is a data item that differs from other items in its nearby or comparable cluster while belonging to a common overall type.
- outlier detectionaddressed by · Outlier detection is the process of identifying observations that substantially deviate from an expected or prevailing pattern in data.
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.

