109
(b) Consider the approach where each transaction tis replaced by an ex-
tended transaction t′that contains all the items in tas well as their re-
spective ancestors. For example, the transaction t={Chips,Cookies}
will be replaced by t′={Chips,Cookies,Snack Food,Food}.Usethis
approach to derive all frequent itemsets (up to size 4) with support ≥
70%.
Answer:
There are 8 frequent 1-itemsets, 25 frequent 2-itemsets, 34 frequent
3-itemsets and 20 frequent 4-itemsets. The frequent 4-itemsets are:
{Food, Snack Food, Meat, Soda}{Food, Snack Food, Meat, Chips}
{Food, Snack Food, Meat, Pork}{Food, Snack Food, Meat, Chicken}
(c) Consider an alternative approach where the frequent itemsets are gen-
erated one level at a time. Initially, all the frequent itemsets involving
items at the highest level of the hierarchy are generated. Next, we use
the frequent itemsets discovered at the higher level of the hierarchy to
generate candidate itemsets involving items at the lower levels of the hi-
erarchy. For example, we generate the candidate itemset {Chips,Diet
Soda}only if {Snack Food,Soda}is frequent. Use this approach to
derive all frequent itemsets (up to size 4) with support ≥70%.
Answer:
There are 8 frequent 1-itemsets, 6 frequent 2-itemsets, and 1 frequent
3-itemset. The frequent 2-itemsets and 3-itemsets are:
(d) Compare the frequent itemsets found in parts (b) and (c). Comment
on the efficiency and completeness of the algorithms.
Answer:
8. The following questions examine how the support and confidence of an asso-
ciation rule may vary in the presence of a concept hierarchy.