Skip to main content
. 2022 Nov 1;13:971569. doi: 10.3389/fpsyg.2022.971569
1. using the large set of items Li –
   1 found in the i –1 traversal
   and the Apriori-gen function to
   generate the candidate set Ci; and
2. Scan the database and calculate
   the support of Ci.
The Apriori algorithm is described
   as follows.
L=find_frequent_1-itemsets(D);l/All
   frequent 1-item sets found
for (i=2: L;.≠;i++)
 {
  C;=apriori_gen(L;.,minsupp);ll
  Generating candidate sets
  for each transaction t D;//Scan
  all transactions
   {
     C=subset(Ci,t);//Identify the set
     of all candidates belonging to t
     for each candidate c C
     c.count++;l/Support count
     increments of 1
   }
     Li={cCk c.countminsupp};/
     Extracting frequent i-item sets
 }
return L=UkLk;l/