Counterfactual Interpreter

Move a single simulated patient's features and watch the fixed logistic model's predicted risk and log-odds contributions update in real time.

  • interpretability
  • counterfactual
  • local explanation
  • logistic regression
Predicted risk of malignancy
42.6%
Classification
BENIGN
Δ log-odds vs. baseline
0.000

Risk gauge

42.6%

Threshold = 0.50. Baseline log-odds = -0.30, current = -0.30.

Counterfactual contribution vs. baseline

-0.12-0.1-0.08-0.06-0.04-0.0200.020.040.060.080.10.120123456Change in log-odds
  • Tumor size (std.): +0.000 log-odds
  • Age (std.): +0.000 log-odds
  • Solid enhancing fraction (std.): +0.000 log-odds
  • Necrosis fraction (std.): +0.000 log-odds
  • Margin irregularity (std.): +0.000 log-odds
  • Endophytic/exophytic index (std.): +0.000 log-odds
Local, not global
This is a local explanation for a single patient under a fixed, linear-in-the-logit model. It tells you how sensitive this prediction is to each feature near this point — it says nothing about how the model behaves for a different patient, and nothing about whether the model is causally correct.