Built independently by an author, for readers. Read the story and support ChapterPal

keyword

apriori-gen function

The apriori-gen function is a candidate generation procedure used in the Apriori algorithm for association rule mining that constructs candidate frequent itemsets of a given size from verified frequent itemsets of the preceding smaller size. It operates through two sequential phases consisting of a join step and a prune step. In the join step, frequent itemsets containing k minus one items are combined with each other to produce potential candidate itemsets of size k, typically by merging pairs that share their first k minus two items in common. In the prune step, the function applies the downward-closure property of support, which dictates that all subsets of a frequent itemset must also be frequent, and immediately discards any candidate itemset containing at least one sub-itemset that is not in the prior frequent set. This systematic elimination minimizes the number of candidate itemsets that must be evaluated against the underlying dataset, significantly improving computational efficiency during frequent pattern discovery.

1 item