rasbt / mlxtend

A library of extension and helper modules for Python's data analysis and machine learning libraries.
https://rasbt.github.io/mlxtend/
Other
4.82k stars 853 forks source link

Adding more metrics for Association Rules #1096

Closed UltraArceus3 closed 3 days ago

UltraArceus3 commented 1 month ago

Discussed in https://github.com/rasbt/mlxtend/discussions/1031

Originally posted by **Nachiket18** April 24, 2023 There are several metrics like lift, leverage, conviction etc are available for association rules. Wondering if it would be of help if we implement other metrics like Jaccard, Added Value, Certainty Factor etc.

We are planning on implementing more Association Rules metrics from this resource: https://mhahsler.github.io/arules/docs/measures Metrics we are currently considering are: Jaccard Coefficient, Certainty Factor, and Added Value.

image image image

Nachiket18 commented 1 month ago
  1. We were able to implement the Jaccard similarity (https://github.com/UltraArceus3/mlxtend/blob/master/mlxtend/frequent_patterns/association_rules.py#L133)
  2. We tested the code with an sample example (https://github.com/UltraArceus3/mlxtend/blob/master/mlxtend/frequent_patterns/tests/test_association_rules.py#L181)

@rasbt - Could you share your thoughts about this? We have also implemented Certainty Factor and Centered Confidence for which we would be writing test cases.

rasbt commented 1 month ago

H @UltraArceus3 and @Nachiket18 . Thanks for suggesting these and offering to help implementing these! On my end, I am currently very maxed out with other projects and wouldn't have the capacity to contribute anything at the moment. However, I could approve PRs etc in case you want to contribute these. (Sorry that I can't be more helpful at the moment, but my free time is mostly taken up by my LLM from Scratch book until mid July; but I am happy to approve PRs, and I actually really appreciate your willingness to contribute).