RkoSup
RkoSup

Reputation: 13

How to find Confidence of association rule in Apriori algorithm

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) ?

OR

confidence = support of (2,3,5)/ support (2,5)?


which equation is correct? please help!!

Upvotes: 0

Views: 17379

Answers (4)

Roshan
Roshan

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

rahul khatri
rahul khatri

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

Has QUIT--Anony-Mousse
Has QUIT--Anony-Mousse

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

n01dea
n01dea

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

Related Questions