Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Include  improvements

Co-authored-by: AdrianSosic <[email protected]>
  • Loading branch information
Scienfitz and AdrianSosic authored Jan 20, 2025
1 parent 2a8623b commit f8f51aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions baybe/insights/shap.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,10 @@ def plot(
plot_func = getattr(shap.plots, plot_type)

# Handle plot types that only explain a single data point
if plot_type in {"force"}:
if plot_type == "force":
if explanation_idx is None:
warnings.warn(
f"When using plot type '{plot_type}', a 'explanation_idx' must be "
f"When using plot type '{plot_type}', an 'explanation_idx' must be "
f"chosen to identify a single data point that should be explained. "
f"Choosing the first measurement at position 0."
)
Expand Down

0 comments on commit f8f51aa

Please sign in to comment.