Apriori Algorithm
Apriori Algorithm for Association Rule Mining · Also known as: Apriori, frequent itemset mining, ARL-Apriori, Apriori association mining
The Apriori algorithm, introduced by Agrawal and Srikant in 1994, is the foundational method for discovering frequent itemsets and association rules in transactional databases. It uses a breadth-first, level-wise search guided by the anti-monotone property of support to efficiently enumerate all item combinations that co-occur above a user-set minimum threshold, then extracts interpretable if-then rules from those patterns.
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.
+3 more
When to use it
Use Apriori when the goal is to discover co-occurrence patterns or if-then relationships in transactional or binary item-presence data — market basket analysis, survey item co-endorsement, medical diagnosis co-occurrence, or text term association. It is suitable for moderate-sized datasets where transparency and interpretability of the output rules is a priority. Do not use Apriori when the transaction database is very large (millions of rows with wide item catalogs), as its repeated full database scans make it slow compared to FP-Growth; in those cases FP-Growth is preferred. It is also inappropriate for continuous numeric data without prior discretization, and it does not model directionality or causality.
Strengths & limitations
- Generates fully interpretable if-then rules with quantified support, confidence, and lift.
- The anti-monotone pruning property makes an otherwise exponential search tractable.
- Requires no prior labeling of the data; it is entirely unsupervised.
- Threshold parameters (support, confidence) give the analyst direct control over rule granularity.
- Output rules are actionable and can be communicated to non-technical stakeholders without algorithmic background.
- Seminal, heavily cited, and implemented in virtually every major data-mining library.
- Repeated full database scans make it slow on large datasets — FP-Growth is often preferred at scale.
- Lowering the support threshold can produce an exponential number of candidate itemsets and rules, making interpretation difficult.
- Does not capture temporal order, directionality, or causal relationships between items.
- Results are sensitive to the choice of support and confidence thresholds, which require domain knowledge or systematic tuning.
Frequently asked
What is the difference between support, confidence, and lift?
Support is the fraction of all transactions that contain the itemset — it measures prevalence. Confidence is the conditional probability that the consequent appears given the antecedent — it measures rule reliability. Lift is the ratio of observed confidence to the baseline frequency of the consequent; a lift above 1 shows a genuine positive association rather than a coincidence driven by item popularity.
When should I choose FP-Growth over Apriori?
FP-Growth compresses the database into a tree structure and mines it without repeated full scans, making it substantially faster on large datasets or when minimum support is low. Apriori is easier to understand and implement and works well on small to moderate datasets where runtime is not a bottleneck.
How do I choose minimum support and confidence?
There is no universal rule. Common practice is to run the algorithm at several support levels, plot the number of frequent itemsets against support, and choose a value in the elbow of the curve. Confidence is then set based on the business or research question — higher confidence for mission-critical rules, lower for exploratory discovery. Always validate the top rules against domain expertise.
Can Apriori handle numeric or continuous data?
Apriori requires binary item-presence data. Continuous variables must be discretized into bins (e.g., age into low/medium/high) before encoding as items. Poor discretization can severely distort the discovered rules, so binning strategy deserves careful thought.
Does Apriori imply causation between items?
No. Association rules capture co-occurrence, not causation or direction. A rule 'bread → butter' means they often appear in the same basket; it does not mean buying bread causes someone to buy butter, nor that the relationship is asymmetric in any causal sense.
Sources
How to cite this page
ScholarGate. (2026, June 3). Apriori Algorithm for Association Rule Mining. ScholarGate. https://scholargate.app/en/machine-learning/apriori-algorithm
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.
- Association RulesMachine learning↔ compare
- FP-GrowthMachine learning↔ compare
- K-meansMachine learning↔ compare
- Online LearningMachine learning↔ compare
- Semi-supervised LearningMachine learning↔ compare