Data Mining: Association Rule Mining Numerical Problem

 Question: 

Suppose out of 100 transactions, 40 transactions have purchased both tea and coffee. Only tea but no coffee has been purchased in 20 transactions, whereas only coffee but no tea has been purchased in 10 transactions. What is the lift of the rule: tea → coffee?

Answer:



To find the lift of the rule teacoffee\text{tea} \rightarrow \text{coffee}, we need to follow these steps:

  1. Calculate the support of tea (Support(tea)\text{Support}(\text{tea})):

    • 40 transactions have both tea and coffee.
    • 20 transactions have only tea but no coffee.
    • So, total transactions with tea = 40 (tea and coffee) + 20 (only tea) = 60 transactions. Support(tea)=60100=0.60
  2. Calculate the support of coffee (Support(coffee)\text{Support}(\text{coffee})):

    • 40 transactions have both tea and coffee.
    • 10 transactions have only coffee but no tea.
    • So, total transactions with coffee = 40 (tea and coffee) + 10 (only coffee) = 50 transactions. Support(coffee)=50100=0.50\text{Support}(\text{coffee}) = \frac{50}{100} = 0.50
  3. Calculate the support of the rule (Support(teacoffee)\text{Support}(\text{tea} \rightarrow \text{coffee})):

    • This is the support of transactions having both tea and coffee. Support(teacoffee)=40100
  4. Calculate the confidence of the rule (Confidence(teacoffee)\text{Confidence}(\text{tea} \rightarrow \text{coffee})): Confidence(teacoffee)=Support(teacoffee)Support(tea)=0.400.60=230.667\text{Confidence}(\text{tea} \rightarrow \text{coffee}) = \frac{\text{Support}(\text{tea} \land \text{coffee})}{\text{Support}(\text{tea})} = \frac{0.40}{0.60} = \frac{2}{3} \approx 0.667














Raghunath

I am studying in M.SC Data Science at the Department of Computer Science and Engineering, Kalyani University. I am an enthusiast blogger.

Post a Comment

Previous Post Next Post