Association rule learning is an unsupervised machine learning approach that discovers relationships between items or events in large datasets. Market basket analysis is its common retail application, identifying products that customers frequently purchase together.
The algorithm searches transaction data for frequent itemsets, then generates rules such as . This means that transactions containing bread are associated with transactions containing butter; it does not prove that buying bread causes someone to buy butter.
Three measures evaluate a rule:
| Measure | Meaning | Formula |
|---|---|---|
| Support | Proportion of all transactions containing both itemsets | |
| Confidence | Proportion of transactions containing that also contain | |
| Lift | Strength of the association compared with purchasing independently |
Suppose a shop records 100 transactions. Bread appears in 40, butter appears in 50, and both appear in 30.
The rule has support , confidence , and lift . Therefore, 30% of all transactions contain both products, 75% of bread purchases include butter, and the positive association is 1.5 times stronger than expected if the purchases were independent.
A lift above indicates a positive association, a lift of indicates independence, and a lift below indicates a negative association. Businesses can use these findings for recommendations, store layouts, and targeted promotions.
To generate useful rules, the system first sets minimum support and confidence thresholds. It removes rare itemsets, reducing the number of candidate rules, and then ranks retained rules by lift. Lower thresholds may reveal more patterns but increase processing and produce weak or accidental associations; higher thresholds can miss uncommon but valuable relationships. Results also depend on representative, accurate transaction data and should be reviewed before business decisions are made.
In an IB Computer Science HL response on A4.3 Machine learning approaches, define the approach, interpret each metric, and distinguish association from causation. A common misconception is that association rules predict a labelled output; instead, they discover patterns in unlabelled transactional data.