Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Consider the data set of market basket transactions shown in following table: Customer ID Transaction ID Items Bought 1 0001 {a,d,e,f} 1 0024 {a,b,c} 2 0012 {b,d,e,f} 2 0031 {a,c,e} 3 0015 {b,d,f} 3 0022 {a,b} 4 0029 {a,b,c} 4 0040 {a,b,d,e} 5 0033 {e,b,d} 5 0038 {f,c,e} Compute the support(%) for itemsets {e}, {b, d}, and {b, d, e} by treating each transaction ID as a market basket

Consider the data set of market basket transactions shown in following table: Customer ID Transaction ID Items Bought 1 0001 {a,d,e,f} 1 0024 {a,b,c} 2 0012 {b,d,e,f} 2 0031 {a,c,e} 3 0015 {b,d,f} 3 0022 {a,b} 4 0029 {a,b,c} 4 0040 {a,b,d,e} 5 0033 {e,b,d} 5 0038 {f,c,e} Compute the support(%) for itemsets {e}, {b, d}, and {b, d, e} by treating each transaction ID as a market basket

Writing

  1. Consider the data set of market basket transactions shown in following table:

Customer ID

Transaction ID

Items Bought

1

0001

{a,d,e,f}

1

0024

{a,b,c}

2

0012

{b,d,e,f}

2

0031

{a,c,e}

3

0015

{b,d,f}

3

0022

{a,b}

4

0029

{a,b,c}

4

0040

{a,b,d,e}

5

0033

{e,b,d}

5

0038

{f,c,e}

  1. Compute the support(%) for itemsets {e}, {b, d}, and {b, d, e} by treating each transaction ID as a market basket.

 

  1. Use the results in part (a) to compute the confidence for the association rules {b,d} −→ {e} and {e} −→ {b,d}.
  1. Is confidence a symmetric measure or an asymmetric measure?
  2. 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.)
  3. Use the results in part (d) to compute the confidence for the association rules {b, d} −→ {e} and {e} −→ {b, d}.

 

pur-new-sol

Purchase A New Answer

Custom new solution created by our subject matter experts

GET A QUOTE

Answer Preview

  1. Compute the support(%) for itemsets {e}, {b, d}, and {b, d, e} by treating each transaction ID as a market basket.

ANSWER: Support can be found as the percentage of occurrence in the given table.

Itemset Transaction ID Support
{e} 0001, 0012, 0031, 0040, 0033, 0038 6/10 = .6 = 60%
{b, d} 0012, 0015, 0040, 0033 4/10 = .4 = 40%
{b, d, e} 0012, 0040, 0033 3/10 = .3 = 30%
  1. Use the results in part (a) to compute the confidence for the association rules {b,d} −→ {e} and {e} −→ {b,d}

ANSWER: Confidence can be calculated as:

Confidence {b,d} −→ {e} = {b,d, e} count / {b,d} count

= 3 / 4 = .75 = 75%

Confidence {e} −→ {b,d} = {e, b,d} count / {e} count

= 3/6 = .5 = 50%

  1. Is confidence a symmetric measure or an asymmetric measure?

ANSWER: Based on the result above, confidence is NOT a symmetric measure, because in part B the confidence is different.

4. 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.)

ANSWER: Draw the table according to as per below tab;e and recompute support

Customer ID a b c d e f
1 1 1 1 1 1 1
2 1 1 1 1 1 1
3 1 1 0 1 0 1
4 1 1 1 1 1 0
5 0 1 1 1 1 1
Itemset Transaction ID Support
{e} 1, 2, 4, 5 4/5 = .8 = 80%
{b, d} 1, 2, 3, 4, 5 5/5 = 1 = 100%
{b, d, e} 1, 2, 4, 5 4/5 = .8 = 80%

5. Use the results in part (d) to compute the confidence for the association rules {b, d} −→ {e} and {e} −→ {b, d}.

ANSWER: Confidence can be calculated as:

Confidence {b,d} −→ {e} = {b,d, e} count / {b,d} count

= 4 / 5 = .8 =   80%

Confidence {e} −→ {b,d} = {e, b,d} count / {e} count

= 4/4 = 1 = 100%