liveBook · Manning

Missing combination

As explained in Outlier Detection in Python

A missing combination is an absent occurrence of a feature-value combination that is expected or possible in a dataset.

A missing combination is an absent occurrence of a feature-value combination that is expected or possible in a dataset. It is a collective outlier: no individual record reveals it, so the data must be regrouped and examined from another perspective. section 12.4 section 12.2

For two categorical features, build a cross-tabulation, replace absent cells with zero, and inspect the distribution of combination counts. Interpret zero or unusually small counts cautiously: a combination may be rare simply because either feature is uncommon. The same procedure extends to unusually low or high counts for pairs or triples, while larger combinations require sufficiently large datasets. section 12.5

Staff and product purchases

A purchase table can be cross-tabulated by Staff ID and Product ID, with the aggregated Count used as the cell value. A completely absent staff-product cell may expose an anomaly that point-anomaly tests cannot find. Existing combinations can instead be aggregated by means, sums, and purchase frequency, then scored with an outlier detector; this finds unusually rare or frequent combinations but does not find combinations absent from the aggregated table. section 12.5 section 12.6.2

How Outlier Detection in Python covers it

How deep it goes
Explains crosstab-based detection, marginal-probability interpretation, and aggregation limits, but stops short of formal probability tests.
Examples
Uses staff-product purchase tables, zero-filled crosstabs, combination-count distributions, and aggregated anomaly scores.
What it assumes
Assumes tabular records and feature values, while teaching aggregation and alternative data perspectives as ways to expose collective anomalies.
What you can do after
Diagnose/debug with crosstabs and aggregate tables to identify absent, rare, or unusually frequent feature combinations.
How it connects
Connects missing combinations with collective outliers, point anomalies, aggregation, marginal probabilities, and Isolation Forest.

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.