liveBook · Manning

Support

As explained in Data Without Labels

Support is the proportion of transactions in an association-rule dataset that contain an itemset or all items in a rule.

In market basket analysis, support measures how often an itemset occurs across all transactions. For a rule P → Q, count transactions containing every item in both P and Q, then divide by the total number of transactions. Support describes frequency, not whether purchasing P makes Q more likely. section 4.3.1 section 4.11

Count complete baskets

Five invoices record whether milk, eggs, bread, and cheese were purchased. The rule {milk, eggs} → {bread} has support 2/5 = 0.4 because two invoices contain all three items. For {bread, eggs} → {cheese}, only one invoice contains all three, so support is 1/5 = 0.2. section 4.3.1

Table 4.2 Dataset to understand the concept of support, confidence, lift, and conviction
Invoice Number
Milk
Eggs
Bread
Cheese
1001
1
1
1
0
1002
0
1
1
1
1003
1
1
1
0
1004
0
1
0
1
1005
0
1
1
0

Use the 1s in each invoice row to verify which transactions contain every item in a rule. section 4.3.1

A minimum-support threshold keeps infrequent combinations out of consideration. Apriori examines item combinations across levels; on large datasets, generating candidates and repeatedly scanning transactions can be costly. In the five-invoice example, the pair {eggs, bread} has support 4/5 = 0.8, while {milk, bread} has 2/5 = 0.4. At a 0.5 threshold, only the first pair qualifies among the listed pairs. section 4.4 section 4.4.2

For a Python workflow, inspect the CSV before modeling: an initial load may mistake the first transaction for a header. Reload with `header=None`, convert transactions to a list of lists, and pass `min_support` to `apyori.apriori`. Check the resulting rule count alongside confidence and lift rather than treating support alone as proof that a rule is useful. With `pyECLAT`, fitting with `min_support=0.02` returns support values for items and combinations. section 4.4.1 section 4.5.1

How Data Without Labels covers it

How deep it goes
Defines the transaction proportion, works five-invoice calculations, and demonstrates thresholds; does not derive a statistical test of rule usefulness.
Examples
Uses five binary-coded invoices, paired-item counts, and Python outputs from retail transaction datasets.
What it assumes
Introduces support from binary transaction records while using Python data loading and library workflows for implementation.
What you can do after
Apply it via apyori or pyECLAT to set frequency thresholds and inspect transaction-pattern support.
How it connects
Connects support to association rules, confidence, lift, Apriori, and ECLAT.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Without Labels. The section links point to the parts of the book it draws on.