Association Rules
Association Rule Learning (Market Basket Analysis) · Also known as: market basket analysis, association rule mining, frequent itemset mining, affinity analysis
Association rule learning is an unsupervised technique that discovers co-occurrence patterns — 'if X then Y' implications — within large transactional datasets. Originally formalized by Agrawal, Imielinski, and Swami (1993) for supermarket basket analysis, it is now widely applied in e-commerce recommendation, health informatics, bioinformatics, and behavioral research.
Read the full method
Sign in with a free account to read this section.
Method map
The neighbourhood of related methods — select a node to explore.
When to use it
Use association rules when your goal is exploratory discovery of co-occurrence patterns in transactional or binary-coded data — purchase baskets, clinical co-diagnoses, clickstreams, survey item batteries, or gene expression profiles. The method is unsupervised and requires no outcome label, making it ideal for hypothesis generation. Do not use it when you have a defined outcome variable and seek to predict it (use supervised classification or regression instead); when your data are continuous and have not been meaningfully discretized; when sample sizes are small (sparse itemsets yield unreliable support estimates); or when rule output will be mistaken for causal inference — association rules are purely correlational.
Strengths & limitations
- Fully unsupervised: no labeled outcome variable required, enabling open-ended pattern discovery.
- Interpretable output: each rule is a human-readable IF–THEN statement with quantified support, confidence, and lift.
- Scales to very large transactional databases via pruning heuristics (Apriori, FP-growth).
- Applicable across domains wherever co-occurrence in binary-coded records is meaningful.
- Hypothesis generation: surfaces unexpected co-occurrences that can guide subsequent confirmatory analysis.
- Requires data to be transactional or discretized binary; continuous features need binning, which introduces arbitrary choices.
- Number of rules can be enormous; post-hoc filtering and ranking by lift or other interestingness measures is mandatory.
- Support and confidence thresholds must be set by the researcher; results are sensitive to these choices.
- Rules are purely correlational — causal claims require additional study design (e.g., experiment or quasi-experiment).
- Computationally expensive on datasets with very large itemsets even with pruning.
Frequently asked
How do I choose the minimum support and confidence thresholds?
There is no universal rule. Start by exploring the support distribution of individual items, then set minimum support low enough to capture patterns of interest but high enough to ensure itemsets appear in at least a meaningful absolute number of transactions. Minimum confidence of 0.6–0.8 is a common starting range, but domain knowledge and lift-based ranking should guide final selection.
What is the difference between confidence and lift, and which should I prioritize?
Confidence measures how often Y follows X among transactions containing X, but it ignores the base rate of Y. Lift corrects for this by dividing confidence by the marginal support of Y. A rule with high confidence but lift near 1 adds little information beyond knowing Y is common. Prioritize lift when filtering for genuinely non-trivial associations.
Can association rules be used for prediction?
They are primarily descriptive and exploratory rather than predictive. While it is possible to use rules with a fixed consequent (a single target item) for classification — a technique called associative classification — standard association rule mining does not optimize a predictive loss function and should not replace supervised models when a labeled outcome is available.
My dataset has continuous variables. Can I still use association rules?
Only after discretization. Continuous variables must be binned into categorical intervals (e.g., age groups, quintiles) before encoding as binary items. The choice of bin boundaries substantially affects which rules emerge, so discretization decisions should be theoretically motivated and reported transparently.
How do association rules differ from correlation analysis?
Correlation (e.g., Pearson's r) measures the linear relationship between two continuous variables. Association rules discover co-occurrence patterns among sets of binary items — any combination size — in transactional data. The metrics (support, confidence, lift) are frequency-based rather than moment-based, and the output is a set of human-readable IF–THEN rules rather than a single numeric coefficient.
Sources
- Agrawal, R., Imielinski, T., & Swami, A. (1993). Mining association rules between sets of items in large databases. Proceedings of the 1993 ACM SIGMOD International Conference on Management of Data, 207–216. DOI: 10.1145/170035.170072 ↗
- Tan, P.-N., Steinbach, M., Karpatne, A., & Kumar, V. (2018). Introduction to Data Mining (2nd ed., Ch. 5). Pearson. ISBN: 978-0-13-312890-1
How to cite this page
ScholarGate. (2026, June 3). Association Rule Learning (Market Basket Analysis). ScholarGate. https://scholargate.app/en/machine-learning/association-rules
Which method?
Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.
- Apriori AlgorithmMachine learning↔ compare
- K-meansMachine learning↔ compare
- Semi-supervised LearningMachine learning↔ compare
- Voting EnsembleMachine learning↔ compare