1. Consider the data set shown in Table (Table 6.15, 515 page), with an item taxonomy given in Figure 6.25. Example of market basket transactions
– https://www.geeksforgeeks.org/apriori-algorithm/
– https://www.softwaretestinghelp.com/apriori-algori…
– https://www.geeksforgeeks.org/association-rule/
Answer for the following questions.
(a) Consider the approach where each transaction t is replaced by an extended transaction t1 that contains all the items in t as well as their respective ancestors.
For example, the transaction t = { Chips, Cookies} will be replaced by t1 = {Chips, Cookies, Snack Food, Food}. Use this approach to derive all frequent itemsets (up to size 4) with support ≥ 70%.
(b) Consider an alternative approach where the frequent itemsets are generated 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 hierarchy.
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%.
2. Consider the data set shown in Table. Example of market basket transactions
Answer for the following questions.
(a) Compute the support for itemsets {e}, {b, d}, and {b, d, e} by treating each transaction ID as a market basket.
(b) Use the results in part (a) to compute the confidence for the association rules {b, d} → {e} and {e} → {b, d}. Is confidence a symmetric measure? (
c) Repeat part (a) by treating each customer ID as a market basket. Each item should be treated as a binary variable (1 if an item appears in at least one transaction bought by the customer, and 0 otherwise). Use this result to compute the confidence for the association rules {b, d} → {e} and {e} → {b, d}.
(d) Use the result in part (c) to compute the confidence for the association rules {b, d} → {e} and {e} → {b, d}.


0 comments