Skip to main content

Apriori Algorithm

  • Reference work entry

Definition

Apriori algorithm (Agrawal, Mannila, Srikant, Toivonen, & Verkamo, 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: level := 1; frequent_sets : = ∅;

2: candidate_sets : = {{i}∣i\(\mathcal I\)};

3: while candidate_sets ≠∅

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

3.2: frequent_sets : = frequent_sets ∪  {C  ∈   candi-date_sets ∣frequency(C) ≥ min_ fr};

3.3 level := level + 1;

3.4: candidate_sets := \(\{A \subset \mathcal{I}\mid \vert A\vert = \mbox{ level and }B \in \mbox{ frequent\_sets for all }B \subset A,\vert B\vert = \mbox{ level} - 1\}\);

4: output frequent_sets;

5: for each F ∈ frequent_sets

5.1: for each EF, E≠∅, EF...

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

Recommended Reading

  • Agrawal, R., Mannila, H., Srikant, R., Toivonen, H., & Verkamo, A. I. (1996). Fast discovery of association rules. In U. M. Fayyad, G. Piatetsky-Shapiro, P. Smyth, & R. Uthurusamy (Eds.), Advances in knowledge discovery and data mining (pp. 307–s328). Menlo Park: AAAI Press.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2011 Springer Science+Business Media, LLC

About this entry

Cite this entry

Toivonen, H. (2011). Apriori Algorithm. In: Sammut, C., Webb, G.I. (eds) Encyclopedia of Machine Learning. Springer, Boston, MA. https://doi.org/10.1007/978-0-387-30164-8_27

Download citation

Publish with us

Policies and ethics