Skip to content

Commit

Permalink
Merge pull request #618 from hchandola/hichando/shap_import_fix
Browse files Browse the repository at this point in the history
Fix shap import errors on python environment with a faulty matplotlib
  • Loading branch information
imatiach-msft committed Jun 6, 2019
2 parents bebca4a + 3ec3027 commit 8b6b8a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion shap/plots/dependence.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

def dependence_plot(ind, shap_values, features, feature_names=None, display_features=None,
interaction_index="auto",
color="#1E88E5", axis_color="#333333", cmap=colors.red_blue,
color="#1E88E5", axis_color="#333333", cmap=None,
dot_size=16, x_jitter=0, alpha=1, title=None, xmin=None, xmax=None, ax=None, show=True):
""" Create a SHAP dependence plot, colored by an interaction feature.
Expand Down Expand Up @@ -72,6 +72,9 @@ def dependence_plot(ind, shap_values, features, feature_names=None, display_feat
"""

if cmap is None:
cmap = colors.red_blue

# create a matplotlib figure, if `ax` hasn't been specified.
if not ax:
figsize = (7.5, 5) if interaction_index != ind else (6, 5)
Expand Down

0 comments on commit 8b6b8a8

Please sign in to comment.