Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to calculate support/ confidence and lift for merged itemsets like {A}->{B,C}

I have a list of itemsets of {A_i}->{X}.

Like:

{A}->{X}
{A}->{Z}
{A,B}->{X}
{A,B}->{W}

Now I want to merge the itemsets like:

{A}->{X,Z}
{A,B}->{X,W}

But I don't know how to calculate support, confidence and lift of every rule.
Is this the sum/count or is this the minimum of all similar itemsets?

For the support the minsupport of all similar sets make sense. But Confidence and lift?

like image 668
501 - not implemented Avatar asked Sep 03 '13 09:09

501 - not implemented


1 Answers

I think that you are refering to association rules.

For an association rule X--> Y, the support of the rule is denoted as sup(X-> Y) and is the number of transactions where XUY appears divided by the total number of transactions.

the confidence is the number of transactions where XUY appears divided by the number of transactions where X appears.

the lift is defined as : lift(X-->Y) = ( (sup(X U Y)/ N) / (sup(X)/ N*sup(Y)/ N ), where N is the number of transactions in the transaction database, sup(X∪Y) is the number of transactions containing X and Y, sup(X) is the number of transactions containing X sup(Y) is the number of transactions containing Y.

For an example of lift calculation, you can check the example 23 of the SPMF software:

http://www.philippe-fournier-viger.com/spmf/index.php?link=documentation.php#lift

like image 122
Phil Avatar answered Nov 07 '22 15:11

Phil