liveBook · Manning

Frequent item set

As explained in Outlier Detection in Python

A frequent item set is a value or combination of values that occurs together in a substantial fraction of records.

A frequent item set is a value within one column, or a combination of values across columns, that appears together in a substantial fraction of records. It is useful for primarily categorical data, where numeric encoding may be inconvenient. section 3.2.4

For outlier detection, frequent pattern outlier factor (FPOF) counts the frequent item sets contained in each row and considers rows containing fewer and less frequent sets more suspicious than typical rows. Association rules provide another frequent-item-set method but are treated separately. section 3.2.4

A practical FIS-based detection workflow is:

  • Convert dates and numeric values into categorical bins, choosing binning schemes that preserve interpretability. section 3.2.4
  • Inspect flagged rows as candidates rather than treating rarity alone as proof of meaningful abnormality. section 3.2.4

Staff expenses and SpeedDating

In staff expenses, repeated combinations such as Staff ID 9000483 with Account Meals form a frequent pattern. In SpeedDating, item sets with minimum support 0.3 include ambitious ratings [0-15] with support 0.797326 and the combination of ambitious and shared-interests ratings with support 0.593817. The listed most-inlier and most-outlier rows have FPOF scores 0.0 and 1.0, respectively.

How Outlier Detection in Python covers it

How deep it goes
Defines item sets and works through binning, Apriori mining, Boolean preparation, and FPOF scoring, while deferring association rules.
Examples
Uses staff-expense combinations and binned SpeedDating ratings, including contrasting inlier and outlier rows.
What it assumes
Assumes tabular data and categorical reasoning, while teaching numeric binning and indicator encoding for mixed columns.
What you can do after
Apply it via Apriori and FPOF to prepare categorical data, mine frequent sets, and rank rows by unusual set membership.
How it connects
Connects categorical data, binning, Apriori, FPOF, association rules, and 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.