First local explanation run¶
This tutorial walks through the first successful end-to-end run using demo data.
Outcome¶
At the end you will:
- train a GRU model in-app,
- inspect one validation window and its hidden activations,
- run TimeSHAP and read pruning, event, and feature attributions.
Prerequisites¶
- Python environment set up for this repo
- Dependencies installed (
uv syncor equivalent)
Step 1: Start the app¶
Step 2: Keep demo data selected¶
In the sidebar:
Dataset: chooseDemo synthetic data- Keep default columns:
Entity column:entity_idTime column:time_idxTarget column:target
Step 3: Train the baseline model¶
In Model:
Model source:Train in app- Keep defaults:
Sequence length = 18GRU hidden size = 32Epochs = 8Batch size = 64Learning rate = 0.005- Click
Train / Retrain
Wait for training to finish, then verify:
Model Diagnosticsshows training and validation curvesSequence Inspectorshows predicted probability and hidden-state heatmap
Step 4: Select a validation sample¶
- Set
Validation sampleto any index - Confirm
Predicted probability,Predicted class, andTrue classare displayed - Review the raw window table under the heatmap
Step 5: Run TimeSHAP¶
In TimeSHAP Local Explanations:
- Keep defaults:
Pruning tolerance (tol) = 0.03Kernel SHAP samples = 200- Click
Run TimeSHAP
Expected outputs:
Pruning Outputtable/objectEvent-Level (Timestep) Attributionschart and tableFeature-Level Attributionschart and table
Next steps¶
- Try
How-to guides -> Use custom CSV or Parquet data - Try
How-to guides -> Load a Lightning checkpoint