SHAP Waterfall Plot Calculator

Explore how every feature moves a prediction from its baseline, customize the waterfall chart, verify calculations, and export clear model explanations instantly for analysis.

SHAP Waterfall Plot Result

Results update after calculation or imported data changes.

No calculation yet
Base value
Positive total
Negative total
Calculated prediction
Entered prediction
Prediction difference
Largest positive
Largest negative
Add feature contributions, then select Calculate and plot.

Full-feature comparison

Feature Contribution Table

Select a chart bar to highlight its matching feature.

Rank Feature Feature value SHAP value Absolute value Direction Contribution Cumulative output

Data Input

Feature name Feature value SHAP value Row actions
Drag rows or use arrow buttons for custom order.
Comma, tab, semicolon, or pipe delimiters are supported.
Headers may use feature, value, and shap names.
Use an array or an object containing features.

Prediction Settings

Feature Display and Ordering

Chart Appearance

Use zero for responsive width.

Formula Used

Prediction = Base value + Σ SHAPᵢ

Net contribution = Σ SHAPᵢ

Contribution percentage = |SHAPᵢ| ÷ Σ|SHAP| × 100

Probability from log-odds = 1 ÷ (1 + e⁻ˣ)

SHAP values explain one prediction using additive feature contributions. Positive values raise the model output from its expected baseline. Negative values reduce that output for the selected observation.

How to Use

  1. Enter feature names, observed values, and SHAP contributions.
  2. Set the expected value and optional model prediction.
  3. Choose output, ordering, filtering, and chart appearance settings.
  4. Select Calculate and plot to generate the explanation.
  5. Review consistency warnings, rankings, and cumulative model output.
  6. Export the plot, table, JSON, PDF, or complete report.

Example Data

FeatureObserved valueSHAP valueMeaning
Living area2,150 sq ft+42,000Raises the predicted house price.
NeighborhoodRiverside+18,500Raises the prediction further.
Property age28 years−12,000Reduces the predicted price.

Interpretation Guide

The base value represents the model’s average expected output. Each bar moves the prediction according to one feature. The final marker shows the cumulative output after every contribution.

Large bars identify strong local influences for this observation. They do not prove that a feature caused the outcome. Correlated features may divide or redistribute their apparent importance.

Classification models often explain logits instead of direct probabilities. Enable inverse-logit conversion when your SHAP values use log-odds. Always confirm the explainer’s output space before interpreting magnitudes.

Frequently Asked Questions

What does a SHAP waterfall plot show?

It shows how features move one prediction from its baseline. Each step adds or subtracts a SHAP contribution. The ending point represents the explained model output.

What is the base value?

The base value is the explainer’s expected model output. It commonly represents an average prediction over background data. Its scale must match the supplied SHAP values.

Why can the calculated prediction differ?

Rounding, output transformations, or mismatched classes can create differences. Approximate explainers may also introduce small reconciliation errors. Check the tolerance and selected output scale carefully.

Can I use probability SHAP values?

Yes, when the explainer returns additive probability-space contributions. Many explainers instead return raw scores or log-odds. Verify the model and explainer documentation before plotting.

How does multiclass input work?

Use SHAP values for one target class at a time. Enter the selected class name or index. Base values and contributions must belong to that class.

What does Other features mean?

It combines filtered or lower-ranked contributions into one step. This preserves the displayed waterfall’s additive reconciliation. Disable grouping to inspect only selected visible features.

Are large SHAP values globally important?

Not necessarily, because this chart explains one observation. Global importance requires aggregation across many samples. Use summary or feature-importance plots for broader behavior.

Do SHAP values prove causation?

No, they describe model behavior rather than causal relationships. Learned correlations can produce strong contributions without causal effects. Use causal methods for cause-and-effect conclusions.

Why are correlated features difficult?

Correlated inputs may share or redistribute attributed contribution values. Different background assumptions can change the allocation. Interpret related features together and document the explainer settings.