InputXGradientExplanation<T>

Models & Types · AiDotNet.Interpretability.Explainers

Result of Input × Gradient attribution.

Implements: IFeatureAttribution<T>

Constructors

Constructor Summary
InputXGradientExplanation()

Properties

Property Summary
Vector<T> Attributions { get; set; } Gets or sets the attribution scores (input × gradient) for each feature.
Vector<T> Gradients { get; set; } Gets or sets the raw gradients for each feature.
Vector<T> Instance { get; set; } Gets or sets the input instance.
Vector<T> Prediction { get; set; } Gets or sets the model prediction.
int TargetClass { get; set; } Gets or sets the target class being explained.
string[] FeatureNames { get; set; } Gets or sets the feature names.

Methods

Method Summary
List<ValueTuple<string, T, T, T>> GetSortedAttributions() Gets attributions sorted by absolute magnitude.
T GetAttributionSum() Gets the sum of attributions (for completeness check).
Vector<T> GetFeatureAttributions()
string ToString() Returns a human-readable summary.