Open AndrewTanQB opened 3 years ago
interesting feature, are you reading to try and fix travis?
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
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.