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

SHAPASH support - Random forest binary classification #321

Closed
SSMK-wq opened this issue Mar 25, 2022 · 2 comments
Closed

SHAPASH support - Random forest binary classification #321

SSMK-wq opened this issue Mar 25, 2022 · 2 comments

Comments

@SSMK-wq
Copy link

SSMK-wq commented Mar 25, 2022

Doesn't shapash support random forest for binary classification?

When I run my code, I got the below error

ValueError: 
            model not supported by shapash, please compute contributions
            by yourself before using shapash
@ThomasBouche
Copy link
Collaborator

Hi,

Shapash support random forest, with this type of model from sklearn :

simple_tree_model_sklearn = (
        "<class 'sklearn.ensemble._forest.ExtraTreesClassifier'>",
        "<class 'sklearn.ensemble._forest.ExtraTreesRegressor'>",
        "<class 'sklearn.ensemble._forest.RandomForestClassifier'>",
        "<class 'sklearn.ensemble._forest.RandomForestRegressor'>",
        "<class 'sklearn.ensemble._gb.GradientBoostingClassifier'>",
        "<class 'sklearn.ensemble._gb.GradientBoostingRegressor'>"
    )

How do you compute random forest ?

@SSMK-wq
Copy link
Author

SSMK-wq commented Mar 28, 2022

Closing this issue as I made a mistake of passing in bagging classifier (with random forest ) to the SHAPASH

@SSMK-wq SSMK-wq closed this as completed Mar 28, 2022
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

No branches or pull requests

2 participants