Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major Refactor + Added metrics #28

Merged
merged 17 commits into from
Mar 11, 2022
Merged

Major Refactor + Added metrics #28

merged 17 commits into from
Mar 11, 2022

Conversation

zStupan
Copy link
Collaborator

@zStupan zStupan commented Mar 11, 2022

This pull request closes #25

Summary

  • Transactions in the dataset are now stored directly as a pandas DataFrame (removed self.data / renamed it to transactions).
  • Added metrics: 'lift', 'coverage', 'rhs_support', 'conviction', 'interestingness', 'comprehensibility', 'netconf', 'yulesq'
  • Renamed 'shrinkage' to 'amplitude'
  • Renamed 'coverage' to 'inclusion'
  • Deleted the AssociationRule class
  • Moved the computation of metrics from the AssociationRule class to the Rule class. The metrics can still be accessed as properties of Rule, e.g. rule.support.
  • Moved rule building functionalities from the AssociationRule class to the NiaARM class.
  • Changed rule building: antecedent and consequent are now lists of Feature objects, where min_val and max_val are the bounds of the attribute as decided by the solution vector, and for categorical attributes, categories is set to a list containing a single selected category.
  • Changed the interface of the NiaARM class as discussed in the linked issue, metrics can now be passed as a dict of pairs {metric_name: weight} or a sequence of metric names, in which case, all the corresponding weights will be set to 1.
  • Added a repr method to the Feature class which replaces _fix_borders and format_rules
  • Updated tests accordingly.
  • Cleaned up the code.

Copy link
Owner

@firefly-cpp firefly-cpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is amazing @zStupan! No major issues at all.

Things to consider in future iterations:

  • add a reference for each metric in order to allow other researchers to explore ideas behind metrics,
  • update docs with mathematical formulas of metrics (one table?).

@firefly-cpp firefly-cpp merged commit 7648f08 into firefly-cpp:main Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more evaluation criteria | Interface changes?
2 participants