Define the concepts of support and confidence and Lift for an association rule mining.
SUPPORT, CONFIDENCE AND LIFT
Imagine a Stationery store with tens of thousands of different products. We wouldn't want to calculate all associations between every possible combination of products. Instead, we would want to select only potentially relevant rules from the set of all possible rules. Therefore, we use the measures support, confidence, and lift to reduce the number of associations we need to analyze
1. Support (S): The metric support tells us how popular an itemset is, as measured by the proportion of transactions in which the itemset appears. Support of an itemset calculated as
Number of transactions that contains an itemset Support (s) /Total number of transaction in the given dataset
In our data shown in table 5.1, the support of itemset (Pencil) is,Support (Pencil) / Total hunder of transaction in the given dataset =4/5=0.8-=80%
The support of itemset (Pencil, Paper) is
Support ((Pencil, Paper]) =Number of transactions that contain an (Pencil, Paper )/Total number of transactions in the given dataset = 3/5=0.6=60%
2. Confidence: Confidence tells us how likely an itemset Y is purchased given that itemset X is purchased expressed as [X-Y]. It is measured by the proportion of transactions with itemset X, in which itemset Y also appears.
Confidence of an association rule X→Y calculated as:
Confidence (c)= Number of transactions that contain an itemset (X, Y)/Number of transactions that contain an itemset (X)
For example, the confidence of the association rule (Paper, Book) →(Rubber) is,
Confidence (Paper, Book) → (Rubber)) = Number of transactions that contain an itemset (Paper, Book, Rubber)/ Number of transactions that contain an itemset (Paper, book
Confidence ([Paper, Book) → (Beer)) =2/3=2/3*100=67%
Hence, the confidence can be interpreted as an estimate of the probability P(Y|X). In other words, this is the probability of finding the itemset Y in transactions under the condition that these transactions also contain the itemset X. Confidence is directed and therefore usually gives different values for the rules X-Y and Y→ X. In our example, the confidence that (Rubber) is purchased given that (Paper, Book) is purchased ([Paper, Book)→ (Rubber]) is 2 out of 3, or 67%. This means the conditional probability P((Rubber) | (Paper, Book)) = 67%.
Note that the confidence measure might misrepresent the importance of an association. This is because it only accounts for how popular itemset X is (in our case (Paper, Book)) but not Y (in our case (Rubber)). If (Rubber) is also very popular in general, there will be a higher chance that a transaction containing (Paper, Book) will also contain (Rubber), thus inflating the confidence measure. To account for the base popularity of both items, we use a third measure called lift.
3. Lift: Lift tells us how likely item Y is purchased when item X is purchased while controlling for how popular items Y and X are. It measures how many times more often X and Y occur together than expected if they were statistically independent.
Lift (X→Y)=; number of transactions that contain an itemset (X, Y)/Support (X) *Support(Y)
If the value of Lift = 1: implies no association between itemsets.
If the value of Lift > 1: greater than 1 means that itemset Y is likely to be if itemset X is bought,
If the value of Lift < 1: less than 1 means that itemset Y is unlikely to be bought if itemset X is bought.
For example, lift for association rule (Paper, Book)-> (Rubber) is calculated as:
Comments
Post a Comment