GradCAMExplanation<T>

Models & Types · AiDotNet.Interpretability.Explainers

Represents the result of a Grad-CAM analysis.

Constructors

Constructor Summary
GradCAMExplanation()

Properties

Property Summary
Matrix<T> Heatmap { get; set; } Gets or sets the upsampled heatmap (same size as input).
Matrix<T> OriginalHeatmap { get; set; } Gets or sets the original (low-resolution) heatmap from feature maps.
T[] ClassScores { get; set; } Gets or sets the class scores from the model.
bool IsGradCAMPlusPlus { get; set; } Gets or sets whether Grad-CAM++ was used.
int TargetClass { get; set; } Gets or sets the target class that was explained.
int[] InputShape { get; set; } Gets or sets the input shape.

Methods

Method Summary
List<ValueTuple<int, int, T>> GetImportantRegions(double threshold) Gets regions with importance above a threshold.
T GetImportanceAt(double normalizedY, double normalizedX) Gets the heatmap value at a specific location (normalized coordinates).
string ToString() Returns a human-readable summary.