asaini / Apriori

Python Implementation of Apriori Algorithm for finding Frequent sets and Association Rules
MIT License
771 stars 435 forks source link

Add lift (interestness) in rules #7

Open huwangxiong opened 9 years ago

huwangxiong commented 9 years ago

Hi, I want to add lift (lift(X ⇒ Y ) =conf (X ⇒ Y )/supp(Y )) after each rules. In your code, may like lift = getSupport(item)/(getSupport(element)*getSupport(remain)). But an error occured (ValueError: too many values to unpack) when I do so. Can you modified the code and add the lift value in each rules. Many thanks.

Best.

wangxiong

asaini commented 8 years ago

Hi @huwangxiong

Can you submit a PR?

sudomakeinstall2 commented 7 years ago

I have implemented this feature and submitted a pull request.

zoeleesss commented 6 years ago

I have implemented this lift feature with more datasets. See my repo here: https://github.com/zoeleesss/Apriori