Skip to content

Apriori Algorithm

The Apriori algorithm is one of the most well-known algorithms for association rule mining and frequent itemset discovery.

  1. Generate 1-itemsets: Find all frequent 1-itemsets (single items)
  2. Generate k-itemsets: For k ≥ 2, generate candidate k-itemsets from frequent (k-1)-itemsets
  3. Prune candidates: Remove candidates that have infrequent subsets (Apriori property)
  4. Count support: Scan database to count support for remaining candidates
  5. Filter frequent: Keep only itemsets meeting minimum support threshold
  6. Repeat: Continue until no more frequent itemsets can be generated

Any subset of a frequent itemset must also be frequent.

This property allows us to prune candidate itemsets efficiently.

Our implementation includes comprehensive runtime tracking and visualization. See the Results page for detailed performance analysis and comparison with FP-Growth.

Apriori Algorithm Analysis

Complete analysis visualization showing runtime breakdown, frequent itemsets by size, support and confidence distributions, top itemsets, and transaction size distribution.

The FP-Growth algorithm addresses many of Apriori’s limitations by using a tree-based approach that avoids candidate generation. See the FP-Growth Algorithm page for details on this alternative approach.