1

I have implemented the Apriori algorithm to find frequent itemsets and association rules on my dataset and the Apyori library in Python gives me these results :

Motif   Support  Confidence      Lift
0          [05M09T, 05M093]  0.066946    0.524590  1.628273
1  [05M091, 05M092, 05M093]  0.052301    0.581395  1.804591

First line is understandable, but how to deal with the second one ? Is the association rule {05M091} --> {05M092, 05M093} or {05M091, 05M092} --> {05M093} ? Because it is not the same for the metrics computation!

Tryzis
  • 41
  • 3
  • This Kaggle notebook might help you: [kaggle-apriory](https://www.kaggle.com/code/ekrembayar/apriori-association-rules-grocery-store) – Nirmal Sankalana Mar 01 '23 at 11:59
  • 1
    The example is great! Thank you. However, it does not solve my problem. – Tryzis Mar 01 '23 at 14:39
  • Can you post the full code? Then I can go through it and give some suggestions – Nirmal Sankalana Mar 01 '23 at 16:22
  • Would be very nice from you. Here is the full code on the github of the project : https://github.com/Kirscher/TextMining_Parcours_de_soin/blob/main/text_mining/Apriori.ipynb – Tryzis Mar 02 '23 at 13:56

0 Answers0