Skip to content

Conversation

AndrewTanQB
Copy link

Description

Often when working with imbalanced datasets, it is necessary to fit DecisionTreeClassifier with class weights.

This simple PR adds the class_weight parameter to the SkopeRules constructor which is then passed to the DecisionTreeClassifier. An alternative would have been to pass a set of optional kwargs to the Classifier / Regressor, but that adds complexity that may not be needed.

Comments welcome.

@ngoix
Copy link
Member

ngoix commented Apr 29, 2021

interesting feature, are you reading to try and fix travis?

@AndrewTanQB
Copy link
Author

Seems like the tests are failing because setup.py (requirements.txt) installs sklearn 0.24.1 and numpy 1.20.2, and imports for skrules/datasets/credit_data.py are failing as well due to sklearn version. Let me open another PR that fixes travis checks

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.

2 participants