Closed shendiaomo closed 3 weeks ago
hi shendiaomo, I've tried using the TreeExplainer with Tensorflow's Boosted Trees Estimator before, but unfortunately it's not compatible. As a plan B, I ended up following this guide here to build something similar using LGBM instead: https://towardsdatascience.com/prediction-and-inference-with-boosted-trees-and-shapley-values-4ffef46b969a
It would be great if TreeExplainer was compatible with Tensorflow, though!
I agree it would be great to support this directly. There is no fundamental reason we couldn't add these bindings, but the TF BoostedTreesEstimator is very tightly bound to the input formats of TF tensors so it might be a bit more work than some other sklearn models. (since the BoostedTreesEstimator does not just take in a standard dataframe by default).
Tagging this since I don't have the bandwidth to tackle it at the moment.
hi shendiaomo, I've tried using the TreeExplainer with Tensorflow's Boosted Trees Estimator before, but unfortunately it's not compatible. As a plan B, I ended up following this guide here to build something similar using LGBM instead: https://towardsdatascience.com/prediction-and-inference-with-boosted-trees-and-shapley-values-4ffef46b969a
It would be great if TreeExplainer was compatible with Tensorflow, though!
At last, I managed to support explaining TF estimators using KernelExplainer, thanks to the discussion here and at https://github.com/slundberg/shap/issues/280.
Directly supporting BoostedTreesEstimator
with TreeExplainer
is still wanted because shap.TreeExplainer(model).shap_interaction_values(X)
is rather useful.
hi shendiaomo, I've tried using the TreeExplainer with Tensorflow's Boosted Trees Estimator before, but unfortunately it's not compatible. As a plan B, I ended up following this guide here to build something similar using LGBM instead: https://towardsdatascience.com/prediction-and-inference-with-boosted-trees-and-shapley-values-4ffef46b969a It would be great if TreeExplainer was compatible with Tensorflow, though!
At last, I managed to support explaining TF estimators using KernelExplainer, thanks to the discussion here and at #280.
Directly supporting
BoostedTreesEstimator
withTreeExplainer
is still wanted becauseshap.TreeExplainer(model).shap_interaction_values(X)
is rather useful.
hi, would you show me some demo code here how can use SHAP with tensorflow Estimator, Thanks a million.
I would also be interested in this
I am interested in this and I would like to see if I can contribute.
This issue has been inactive for two years, so it's been automatically marked as 'stale'.
We value your input! If this issue is still relevant, please leave a comment below. This will remove the 'stale' label and keep it open.
If there's no activity in the next 90 days the issue will be closed.
This issue has been automatically closed due to lack of recent activity.
Your input is important to us! Please feel free to open a new issue if the problem persists or becomes relevant again.
I can't see
BoostedTreesEstimator
in the source code ofTreeExplainer
, butBoostedTreesEstimator
is an important part of TensorFlow canned estimators and should be supported byTreeExplainer
.