<P> The Apriori algorithm was proposed by Agrawal and Srikant in 1994 . Apriori is designed to operate on databases containing transactions (for example, collections of items bought by customers, or details of a website frequentation). Other algorithms are designed for finding association rules in data having no transactions (Winepi and Minepi), or having no timestamps (DNA sequencing). Each transaction is seen as a set of items (an itemset). Given a threshold C (\ displaystyle C), the Apriori algorithm identifies the item sets which are subsets of at least C (\ displaystyle C) transactions in the database . </P> <P> Apriori uses a "bottom up" approach, where frequent subsets are extended one item at a time (a step known as candidate generation), and groups of candidates are tested against the data . The algorithm terminates when no further successful extensions are found . </P> <P> Apriori uses breadth - first search and a Hash tree structure to count candidate item sets efficiently . It generates candidate item sets of length k (\ displaystyle k) from item sets of length k − 1 (\ displaystyle k - 1). Then it prunes the candidates which have an infrequent sub pattern . According to the downward closure lemma, the candidate set contains all frequent k (\ displaystyle k) - length item sets . After that, it scans the transaction database to determine frequent item sets among the candidates . </P> <P> The pseudo code for the algorithm is given below for a transaction database T (\ displaystyle T), and a support threshold of ε (\ displaystyle \ epsilon). Usual set theoretic notation is employed, though note that T (\ displaystyle T) is a multiset. C k (\ displaystyle C_ (k)) is the candidate set for level k (\ displaystyle k). At each step, the algorithm is assumed to generate the candidate sets from the large item sets of the preceding level, heeding the downward closure lemma . c o u n t (c) (\ displaystyle count (c)) accesses a field of the data structure that represents candidate set c (\ displaystyle c), which is initially assumed to be zero . Many details are omitted below, usually the most important part of the implementation is the data structure used for storing the candidate sets, and counting their frequencies . </P>

Difference between partitions based apriori and apriori algorithm