Tree SHAP Plot Calculator

Explore local and global Tree SHAP explanations, compare feature effects, validate prediction decomposition, and export interactive charts for clearer model interpretation and reporting workflows.

Tree SHAP results

Generated explanation summary.

Not calculated
Base value
SHAP total
Reconstructed prediction
Difference
Positive total
Negative total
Top positive driver
Top negative driver

Feature statistics

FeatureMean SHAPMean |SHAP|MedianStd. dev.PositiveNegativeRank

Interpretation

Data-quality checks

Model and explanation settings

Choose the explanation scope, output scale, and observation.

SHAP data

Each row represents one feature contribution for one observation and class.

ObservationFeatureFeature valueSHAP valueClassPredictionInteraction featureInteraction valueAction
CSV columns may use observation, feature, value, shap, class, prediction, interaction_feature, and interaction_value.

Plot selection and feature controls

Chart appearance

Use zero for responsive width.
9
0.75
13

Formula used

Tree SHAP explains a prediction as a base value plus additive feature contributions. The selected output scale must match the supplied SHAP values. Mismatched scales can create misleading reconciliation differences.

f(x) = E[f(X)] + Σ φj
Global importance for feature j = (1 / n) × Σ |φij|
Probability from log-odds z = 1 / (1 + e^-z)

How to use

  1. Select the model, task, output scale, and explanation scope.
  2. Enter a base value and the model prediction.
  3. Add feature values and their SHAP contributions.
  4. Choose a plot type and filtering options.
  5. Generate the plot and review reconciliation warnings.
  6. Export the chart, data, or complete PDF report.

Example data

FeatureFeature valueSHAP value
Age420.31
Income720000.48
Credit score690-0.22
Account age5.40.14
Missed payments2-0.37

Frequently asked questions

What does a positive SHAP value mean?

It moves the selected model output above its base value. The practical meaning depends on the chosen output scale.

What does a negative SHAP value mean?

It moves the selected model output below its base value. It does not automatically mean a feature is undesirable.

Why does the prediction not reconcile?

The base value, output scale, selected class, or supplied SHAP values may be inconsistent. Rounding can also create small differences.

Can this calculator train a tree model?

No. It visualizes SHAP values exported from an already trained tree-based model.

What is mean absolute SHAP importance?

It averages each feature’s absolute contribution across observations. This measures model impact without preserving direction.

Does SHAP prove causation?

No. SHAP explains model behavior, not causal relationships in the real world.

Which output scale should I choose?

Choose the same scale used when SHAP values were generated. Common scales include raw margins, probabilities, and log-odds.

How are multiclass values handled?

Use the class column and class selector. Each class should have its own SHAP contributions and matching base value.

What does the dependence plot show?

It plots a feature’s original value against its SHAP contribution. Color can represent another interacting feature.

Can I compare observations?

Yes. Select compare observations, choose two observation identifiers, and use the contribution or decision plot.

What are SHAP interaction values?

They separate main effects from pairwise feature interactions. Add interaction fields to create the interaction heatmap.

Related Calculators

Decision Tree DiagramTree Depth-versus-Accuracy PlotNode Impurity PlotRandom Forest Feature Importance PlotNumber of Trees-versus-Error PlotOut-of-Bag Error CurveBoosting Loss CurveBoosting Feature Importance PlotIndividual Tree Comparison Plot

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.