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

add balanced class functionality #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

2 participants