Skip to content

Commit

Permalink
Merge pull request #515 from guillaume-vignal/master
Browse files Browse the repository at this point in the history
fix bug on TreeExplainer selection
  • Loading branch information
ThomasBouche authored Dec 8, 2023
2 parents 8309882 + 23ce9cc commit 201033c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shapash/backend/shap_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, model, preprocessing=None, masker=None, explainer_args=None,
else:
if shap.explainers.Linear.supports_model_with_masker(model, self.masker):
self.explainer = shap.Explainer(model=model, masker=self.masker)
elif shap.explainers.Tree.supports_model_with_masker(model, self.masker):
elif shap.explainers.Tree.supports_model_with_masker(model, None):
self.explainer = shap.Explainer(model=model)
elif shap.explainers.Additive.supports_model_with_masker(model, self.masker):
self.explainer = shap.Explainer(model=model, masker=self.masker)
Expand Down

0 comments on commit 201033c

Please sign in to comment.