32 Chapter 2 assoCiation rules
In the first part, L
k−1
, the large itemsets generated in the previous pass are
used to generate C
k
, the large candidate k-itemsets. The apriori-gen( ) func-
tion is used for this purpose. In the second part, each itemset in C
k
is counted
in all transactions in the database. Only those itemsets with support that is at
least minsup are collected to generate L
k
.
2.2.2 Apriori-gen( ) Function
The apriori-gen( ) function takes an argument L
k−1
to generate C
k
, the set
of potentially large k-itemsets. In other words, C
k
is a superset of the set of
all large k-itemsets. The function consists of two steps. First, join operations
are performed to join L
k−1
with L
k−1
. In the next step, we perform pruning
to delete ...