scikit-learn-contrib / skope-rules

machine learning with logical rules in Python
http://skope-rules.readthedocs.io
Other
599 stars 96 forks source link

New features #49

Open fayeab opened 3 years ago

fayeab commented 3 years ago

closes #42

Hello,

I've added two features (filtering and deduplication criteria) for skope rules.

This work is an improvement of #42 We have 3 new parameters for SkopeRule class :

deduplication_criterion: str, optional (default='f1')
    The criterion to be used for deduplicating the rules.
    Either 'f1', 'mcc' or 'custom_func'.
custom_func: FunctionType, optional (default=None)
    A personalised function that can be used as either/both a filtering
    or/and deduplication criterion.
    Has to take 1 parameter (tuple of size 4) which is supposed to be the confusion matrix
    elements (tn, fp, fn, tp) (in that order).
ngoix commented 3 years ago

Thanks @fayeab for the good work It is gonna be hard to get reviews on this as a whole though, I would split this PR into at least 3 new ones:

  1. requirement updates and test updates / sample_weight renaming / data getters update
  2. addition of filtering_criteria parameter
  3. addition of deduplication_criterion and custom_func params

These PRs do not need to be independent and are probably to be based on each others 1. <- 2. <- 3.- shouldn't take much time to split the code and it will make the review process a lot smoother