Crate tsai_explain

Crate tsai_explain 

Source
Expand description

§tsai_explain

Explainability tools for tsai-rs: activation/gradient capture, attribution maps.

This crate provides:

  • Activation capture hooks
  • Gradient capture hooks
  • Attribution maps (CAM-like for CNNs, attention for transformers)

Structs§

ActivationCapture
Captured activations from model layers.
AttributionMap
Attribution map over time series.
GradientCapture
Captured gradients from model layers.
IntegratedGradientsConfig
Configuration for Integrated Gradients.

Enums§

AttentionAggregation
How to aggregate attention weights across layers.
AttributionMethod
Method for computing attribution maps.
BaselineType
Type of baseline to use for Integrated Gradients.

Functions§

attention_attribution
Compute Attention-based attribution for transformer models.
grad_cam
Compute GradCAM attribution for CNN models.
input_gradient
Compute Input × Gradient attribution.
integrated_gradients
Compute Integrated Gradients attribution.
random_baseline
Create a random baseline for Integrated Gradients.
zero_baseline
Create a zero baseline for Integrated Gradients.