Skip to content

Commit

Permalink
fix bug MAIF#580
Browse files Browse the repository at this point in the history
  • Loading branch information
sam94700 committed Sep 16, 2024
1 parent bbb87bb commit c802a85
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion shapash/explainer/smart_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ def _update_xaxis_labels(self, fig, xs, zoom=False):
Parameters:
- fig: The Plotly figure object to update.
- xs: A list of x-axis label strings.
- zoom: Boolean indicating whether zoom is enabled.
- zoom: BoOverallQuaolean indicating whether zoom is enabled.
"""

# Define common x-axis parameters
Expand Down Expand Up @@ -1621,6 +1621,8 @@ def contribution_plot(
col_scale, cmin, cmax = self.tuning_colorscale(self.explainer.y_pred.loc[list_ind], keep_90_pct=True)

# Subset
self.explainer.x_init[col_name].fillna(-999, inplace=True)

if self.explainer.postprocessing_modifications:
feature_values = self.explainer.x_contrib_plot.loc[list_ind, col_name]
else:
Expand Down

0 comments on commit c802a85

Please sign in to comment.