Association model
Apriori Algorithm
Mining frequent itemsets and generating association rules from transactional databases.
The Apriori Algorithm is a classic algorithm for mining frequent itemsets and generating association rules. It uses a breadth-first search strategy and the "apriori property" that all subsets of a frequent itemset must also be frequent.
Formula
Support(XâY) = P(XâŠY), Confidence = P(Y|X)
How it works
- Find all frequent 1-itemsets (items above support threshold)
- Generate candidate k-itemsets from (k-1)-itemsets
- Prune candidates with infrequent subsets
- Scan database to count candidate support
- Generate rules from frequent itemsets meeting confidence threshold
When to use it
- For market basket analysis
- When finding item associations
- For recommendation systems
- In retail analytics
- For discovering hidden patterns
Advantages
- Simple and intuitive
- Generates interpretable rules
- Well-understood and widely used
- Works with categorical data
- Pruning reduces search space
Limitations
- Multiple database scans required
- Generates many candidate itemsets
- Memory intensive
- Slow with large datasets
- Low support threshold causes explosion
Example uses
- Market basket analysis
- Cross-selling strategies
- Website navigation analysis
- Medical diagnosis patterns
- Fraud detection
Related models
Need a model built on your data?
Tell us the decision you want to improve. We will tell you whether your data can support it and which approach fits.