linkedin / TE2Rules

Python library to explain Tree Ensemble models (TE) like XGBoost, using a rule list.
Other
41 stars 5 forks source link

Added adapter for xgboost XGBClassifier - tested with xgboost 2.0.3 #7

Closed LeLoMAu closed 5 months ago

LeLoMAu commented 5 months ago

I've run black command on python files inside te2rules, that is why format is changed for some

groshanlal commented 5 months ago

Regarding the whitespace changes: The repo already has some linters like black, flake8 and mypy setup. Please run pre-commit install to automatically setup the linters on your local repo. This will make sure your PR follows the same code formatting standards.

I tried checking out the PR locally and observed some minor formatting errors: The following flake8 checks fail:

te2rules/adapter.py: error: Function is missing a type annotation for one or more arguments
te2rules/adapter.py: error: Item "None" of "Optional[Match[Any]]" has no attribute "group"
Found 2 errors in 1 file (checked 5 source files)

Can you please run pre-commit install and then push another commit on top after resolving the formatting issues?

LeLoMAu commented 5 months ago

Hey @groshanlal, about pre-commit install:

groshanlal commented 5 months ago

Looks good to me! Thanks @LeLoMAu.