Assignment #2
Open the assignment #2 MS word file and answer the following questions. If you complete it, please upload into the blackboard.
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 item sets (up to size 4) with support ? 70%.
(b) Consider an alternative approach where the frequent item sets are generated one level at a time. Initially, all the frequent item sets involving items at the highest level of the hierarchy are generated. Next, we use the frequent item sets discovered at the higher level of the hierarchy to generate candidate item sets 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 item sets (up to size 4) with support ? 70%.
__________________________________________________________________________________
Assignment #2 2. Consider the data set shown in Table. Example of market basket transactions
Customer ID Transaction ID Item Bought
1 0001 {a,d,e}
1 0024 {a,b,c,e}
2 0012 {a,b,d,e}
2 0031 {a,c,d,e}
3 0015 {b,c,e}
3 0022 {b,d,e}
4 0029 {c,d}
4 0040 {a,b,e}
5 0033 {a,d,e}
5 0038 {a,b,e}
Assignment #2 Answer for the following questions.
(a) Compute the support for item sets {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}.?
Recent Comments