Local explanation results
Run the calculator to inspect the selected prediction.
| Rank | Feature | Original value | Condition | Coefficient | Contribution | Direction | Absolute | Percent | Stability |
|---|
Formula used
The local surrogate estimates the model near one selected observation. Each interpretable feature receives a coefficient. Its active value produces a local contribution.
The calculator reconstructs the local prediction from the intercept and contributions. Fidelity metrics compare surrogate predictions with model predictions. Stability estimates coefficient variation across repeated seeded runs.
How to use
- Enter feature names, values, conditions, activations, and LIME coefficients.
- Choose classification or regression, then enter the prediction and intercept.
- Adjust perturbation, kernel, feature selection, and surrogate settings.
- Choose plot filters, sorting, comparison, grouping, and display options.
- Paste perturbation diagnostics when available for measured fidelity results.
- Generate the explanation, inspect warnings, and export the report.
Example feature data
| Feature | Value | Condition | Activation | Coefficient | Interpretation |
|---|---|---|---|---|---|
| Annual income | 72000 | Income > 65000 | 1 | 0.182 | Supports approval |
| Debt-to-income | 0.39 | DTI > 0.36 | 1 | -0.173 | Opposes approval |
| Recent inquiries | 3 | Inquiries > 2 | 1 | -0.124 | Opposes approval |
Interpretation and limitations
LIME explains one prediction locally, not the entire model. Large positive contributions support the selected output. Large negative contributions oppose it.
Explanations can change with sampling, seeds, discretization, and kernel width. A high local fidelity score improves confidence. It does not prove causality or global importance.
Use domain knowledge before acting on any explanation. Compare several seeds and nearby observations. Investigate unstable or highly correlated features carefully.
Frequently asked questions
What does a LIME feature plot show?
It shows which local feature rules support or oppose one selected prediction.
Are coefficients and contributions identical?
They match when the interpretable activation equals one. Otherwise, contribution equals coefficient multiplied by activation.
Why can LIME results change?
LIME uses sampled perturbations. Different seeds, samples, and kernels can produce different local fits.
What is local fidelity?
Local fidelity measures how closely the surrogate follows the original model near the selected observation.
What kernel width should I use?
Smaller widths emphasize nearby samples. Larger widths create broader but less local explanations.
Can this calculator train a black-box model?
No. It visualizes supplied LIME outputs and diagnostics rather than training the original model.
How should categorical features be entered?
Enter a readable rule, such as Color equals Blue, and set activation to one when active.
Is a LIME contribution causal?
No. It describes local model behavior and does not establish a causal relationship.
How can I test explanation stability?
Run several seeds, compare coefficient signs, and inspect each feature’s variation and stability score.
How is LIME different from SHAP?
LIME fits a local surrogate. SHAP uses game-theoretic attribution with different assumptions and properties.