mlxtend icon indicating copy to clipboard operation
mlxtend copied to clipboard

Add Jaccard, Certainty, and Kulczynski association rules metrics

Open UltraArceus3 opened this issue 1 year ago • 2 comments

Description

We have implemented three association rules metrics: Jaccard Coefficient, Certainty Factor, and Kulczynski. We have added appropriate test cases for each of these metrics. We have also added an optional parameter to association_rules, called return_metrics. The user can pass in a list of metrics for the function to return, rather than having the function generate every implemented metric.

Related issues or pull requests

Resolves #1096

Pull Request Checklist

  • [X] Added a note about the modification or contribution to the ./docs/sources/CHANGELOG.md file (if applicable)
  • [X] Added appropriate unit test functions in the ./mlxtend/*/tests directories (if applicable)
  • [X] Modify documentation in the corresponding Jupyter Notebook under mlxtend/docs/sources/ (if applicable)
  • [X] Ran PYTHONPATH='.' pytest ./mlxtend -sv and make sure that all unit tests pass (for small modifications, it might be sufficient to only run the specific test file, e.g., PYTHONPATH='.' pytest ./mlxtend/classifier/tests/test_stacking_cv_classifier.py -sv)
  • [X] Checked for style issues by running flake8 ./mlxtend

UltraArceus3 avatar Jun 23 '24 22:06 UltraArceus3

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Hi @rasbt, we're looking at the failed formatting test case. The suggested formatting seems to be strange.

image

It looks like it is taking issue with two lines in test_association_rules.py. It is formatting just those two lines rather than the entire block. We could go back and change all the lines to reflect that same format, but then it would take up ~100 lines of just numbers. What are your thoughts?

UltraArceus3 avatar Jun 27 '24 22:06 UltraArceus3

It looks like it is taking issue with two lines in test_association_rules.py. It is formatting just those two lines rather than the entire block. We could go back and change all the lines to reflect that same format, but then it would take up ~100 lines of just numbers. What are your thoughts?

Thanks for the PR. I am totally fine with not changing the formatting as suggested by black here. Let's see if this can be achieved via an # fmt: off

rasbt avatar Jul 02 '24 00:07 rasbt

Thanks @rasbt for reviewing and approving the change. It was fun to contribute to the library!

Nachiket18 avatar Jul 02 '24 00:07 Nachiket18

Thanks @rasbt for approving and reviewing our change! It was a great experience to contribute to this library!

ankithn30 avatar Jul 02 '24 00:07 ankithn30

Thank you @rasbt! It was great working with you on this change. We hope to continue contributing to your library in the future!

UltraArceus3 avatar Jul 02 '24 00:07 UltraArceus3