Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-vignal committed Mar 28, 2024
1 parent 0dad3f7 commit 7563635
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/unit_tests/explainer/test_smart_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ def setUp(self):
self.smart_explainer._case, self.smart_explainer._classes = check_model(model)
self.smart_explainer.state = MultiDecorator(SmartState())
self.smart_explainer.y_pred = None
self.smart_explainer.proba_values = None
self.smart_explainer.features_desc = dict(self.x_init.nunique())
self.smart_explainer.features_compacity = self.features_compacity

Expand Down Expand Up @@ -863,7 +864,7 @@ def test_contribution_plot_8(self):
xpl.model = model
np_hv = [f"Id: {x}<br />Predict: {y}" for x, y in zip(xpl.x_init.index, xpl.y_pred.iloc[:, 0].tolist())]
np_hv.sort()
output = xpl.plot.contribution_plot(col)
output = xpl.plot.contribution_plot(col, proba=False)
annot_list = []
for data_plot in output.data:
annot_list.extend(data_plot.hovertext.tolist())
Expand Down Expand Up @@ -895,7 +896,7 @@ def test_contribution_plot_9(self):
model = lambda: None
model.classes_ = np.array([0, 1])
xpl.model = model
output = xpl.plot.contribution_plot(col, max_points=39)
output = xpl.plot.contribution_plot(col, max_points=39, proba=False)
assert len(output.data) == 4
for elem in output.data:
assert elem.type == "violin"
Expand Down

0 comments on commit 7563635

Please sign in to comment.