Skip to main content

Apriori Algorithm

  • Reference work entry
  • First Online:

Definition

Apriori algorithm (Agrawal et al. 1996) is a data mining method which outputs all frequent itemsets and association rules from given data.

Input: set \(\mathcal{I}\) of items, multiset \(\mathcal{D}\) of subsets of \(\mathcal{I}\), frequency threshold min_fr, and confidence threshold min_conf.

Output: all frequent itemsets and all valid association rules in \(\mathcal{D}\)

Method:

  1. 1:

    level := 1; frequent_sets : = Ø;

  2. 2:

    candidate_sets : = \(\{\{i\}\vert i \in \mathcal{I}\}\);

  3. 3:

    while candidate_sets ≠ Ø

    1. 3.1:

      scan data \(\mathcal{D}\) to compute frequencies of all sets in candidate_sets;

    2. 3.2:

      frequent_sets : = frequent_sets ∪ {C ∈  candidate_sets ∣frequency(C) ≥ min_fr};

    3. 3.3:

      level := level + 1;

    4. 3.4:

      candidate_sets := \( \{A\, \subset\, \mathcal{I}\, \mid \mid\, A\, \mid = \mathrm{level\, and}\, B \in\, \mathrm{frequent}\_\mathrm{sets\, for\, all}\, B\, \subset\, A, \, \mid\, B\mid = \text{level} - 1\}\);

  4. 4:

    output frequent_sets;

  5. 5:

    for each F ∈ frequent_sets

      ...

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   699.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Hardcover Book
USD   949.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Recommended Reading

  • Agrawal R, Mannila H, Srikant R, Toivonen H, Verkamo AI (1996) Fast discovery of association rules. In: Fayyad UM, Piatetsky-Shapiro G, Smyth P, Uthurusamy R (eds) Advances in knowledge discovery and data mining. AAAI Press, Menlo Park, pp 307–328

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer Science+Business Media New York

About this entry

Cite this entry

Toivonen, H. (2017). Apriori Algorithm. In: Sammut, C., Webb, G.I. (eds) Encyclopedia of Machine Learning and Data Mining. Springer, Boston, MA. https://doi.org/10.1007/978-1-4899-7687-1_27

Download citation

Publish with us

Policies and ethics