Skip to content

Commit

Permalink
Allow XGBoost node weights to be overridden
Browse files Browse the repository at this point in the history
This addresses an issue in #90 #29 #352
  • Loading branch information
slundberg committed Jan 22, 2019
1 parent e61f3f8 commit a3de87a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shap/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# flake8: noqa

__version__ = '0.28.0'
__version__ = '0.28.1'

from .explainers.kernel import KernelExplainer, kmeans
from .explainers.sampling import SamplingExplainer
Expand Down
2 changes: 1 addition & 1 deletion shap/explainers/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def shap_values(self, X, y=None, tree_limit=-1, approximate=False):
"""

# shortcut using the C++ version of Tree SHAP in XGBoost, LightGBM, and CatBoost
if self.feature_dependence == "tree_path_dependent" and self.model.model_type != "internal":
if self.feature_dependence == "tree_path_dependent" and self.model.model_type != "internal" and self.data is None:
phi = None
if self.model.model_type == "xgboost":
assert_import("xgboost")
Expand Down

0 comments on commit a3de87a

Please sign in to comment.