-
Notifications
You must be signed in to change notification settings - Fork 163
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
Are there any way to interprete the DF21 model, like graphviz for Decision tree or SHAP for XGB? #12
Comments
Q1: Is there any way to interprete the model?
Q2: Something like graphviz for Decision tree? |
Closed via issue #14 |
Hey, |
After taking a look at this page, I think there should be no problem if we are going to implement some methods on exporting the tree information in DF21 to SHAP. |
Hey, Could you please make DF21 compatible with python 3.8.2? because I'm a Mac user and SHAP needs python 3.8.2 to run on Mac. I'm trying to run:
Before I was able to run it successfully with python 3.9.1 but now I need to use python 3.8.2 |
Hi @Maryom, could you delete the pyproject.toml in the home diertory and re-install the package in the editable mode? If there is still a problem, could you give me more traceback information? |
Hi @xuyxu after deleting pyproject.toml I got the following errors:
|
what is the version of your cython and numpy package? |
numpy version is 1.20.1 because SHAP needs this version. cython version is 0.29.21 I got the following warnings:
|
Okay after I downgraded numpy I got Any solution please? |
I think we can safely use a lower version of shap that only requires Numpy 1.19 :-) |
It worked perfectly with SHAP 0.37.0 |
Great! I will open a PR latter, and list several steps we are going to do there 😄. Thanks |
@xuyxu Nice, I hope we will add SHAP support ASAP 🙏🏼 |
cc @Maryom Steps:
It may be a good choice to start with the first step. You can create a file in def get_shap_explainer_forest(forest):
"""
Get the tree explainer for a forest estimator in the deep forest.
Parameters
----------
forest : :obj:`forest`
The forest estimator that we want to explain.
Returns
-------
TreeExplainer : :obj:`shap.TreeExplainer`
Tree explainer for the forest estimator.
""" The forest structure used in DF21 is available here. Suppose that we have a total number of 100 trees in a forest, then the lists of
We can first follow instructions in the Shap Documentation, and see if there is any problem when passing the forest model in DF21 to Since the forest structure is much different from that in Scikit-Learn, I am not sure if things will go smooth. Feel free to ask me in this PR if you have any problem, and I will reply to you ASAP. BTW, you can open the PR once |
Closed via #14 |
No description provided.
The text was updated successfully, but these errors were encountered: