Reputation: 13
I am using Apriori algorithm to identify the frequent item sets of the customer.Based on the identified frequent item sets I want to prompt suggest items to customer when customer adds a new item to his shopping list.Assume my one identified frequent set is [2,3,5].My question is;
if user has already added item 2 and item 5, i want check the confidence of the rule to suggest item 3. for that;
confidence = support of (2,3,5)/ support (3) ?
confidence = support of (2,3,5)/ support (2,5)?
which equation is correct? please help!!
Upvotes: 0
Views: 17379
Reputation: 101
If you just want the answer without any explanation: confidence = support of (2,3,5)/ support (2,5) in your question is the answer.
Upvotes: 0
Reputation: 11
Suppose A^B -> C
then
Confidence = support(A^B->C)
i.e. a number of transactions in which all three items are present / support(A,B)
i.e. a number of transactions in which both A and B are present.
So the answer is confidence= support(2,5,3)/support (2,5)
Upvotes: 1
Reputation: 77454
What is your antecedent?
Stop.treating equarions as black boxes you need to lok up. understand them or you will fail.
Upvotes: -2
Reputation: 1580
If the association rule is (2,5) -> (3), than is X = (2,5) and Y = (3). The confidence of an association rule is the support of (X U Y) divided by the support of X. Therefore, the confidence of the association rule is in this case the support of (2,5,3) divided by the support of (2,5).
Upvotes: 7