ymoch / apyori

A simple implementation of Apriori algorithm by Python.
MIT License
243 stars 93 forks source link

Rules with same products on inverse order #35

Closed girottoma closed 5 years ago

girottoma commented 6 years ago

Hi!

Thank you by the code, looks like very good!

My point is: It's normal appear rules with same products on inverse order?

For example:

Base_Item | Append_Item | Support | Confidence | Lift Rice | Egg | 0.059533 | 0.911369 | 7.44109 Egg | Rice | 0.059533 | 0.486073 | 7.44109

And if it's normal, why this happen? and why the Confidence is different?

Thanks!!!!

MirzaBaig715 commented 6 years ago

@girottoma An association rule is an implication of the form. [Support(Rice=>Egg)Confidence(Rice=>Egg)] but in inverse order that will be [Support(Egg=>Rice)Confidence(Egg=>Rice)]. Order of Item matters.

ymoch commented 5 years ago

Thanks very much! My answer is the same.