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:
level := 1; frequent_sets : = Ø;
- 2:
candidate_sets : = \(\{\{i\}\vert i \in \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 ∈ candidate_sets ∣frequency(C) ≥ min_fr};
- 3.3:
level := level + 1;
- 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\}\);
- 3.1:
- 4:
output frequent_sets;
- 5:
for each F ∈ frequent_sets
-
...
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsRecommended 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
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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
DOI: https://doi.org/10.1007/978-1-4899-7687-1_27
Published:
Publisher Name: Springer, Boston, MA
Print ISBN: 978-1-4899-7685-7
Online ISBN: 978-1-4899-7687-1
eBook Packages: Computer ScienceReference Module Computer Science and Engineering