GradientSHAPExplanation<T>

Models & Types · AiDotNet.Interpretability.Explainers

Represents the result of a GradientSHAP analysis.

Implements: IFeatureAttribution<T>

Constructors

Constructor Summary
GradientSHAPExplanation()

Properties

Property Summary
T ExpectedValue { get; set; } Gets or sets the expected value (average prediction over background data).
T InputPrediction { get; set; } Gets or sets the prediction for the input.
Vector<T> AttributionVariances { get; set; } Gets or sets the variance of attributions across samples.
Vector<T> Attributions { get; set; } Gets or sets the SHAP values (feature attributions).
int NumSamples { get; set; } Gets or sets the number of samples used.
int OutputIndex { get; set; } Gets or sets the output index that was explained.
string[] FeatureNames { get; set; } Gets or sets the feature names.

Methods

Method Summary
List<ValueTuple<string, T, T, T>> GetAttributionsWithConfidence(double numStdDev) Gets confidence intervals for attributions.
List<ValueTuple<string, T, T>> GetSortedAttributions() Gets attributions sorted by absolute value (most important first).
Vector<T> GetFeatureAttributions()
string ToString() Returns a human-readable summary.