GuidedGradCAMExplanation<T>

Models & Types · AiDotNet.Interpretability.Explainers

Guided GradCAM explanation result.

Constructors

Constructor Summary
GuidedGradCAMExplanation(Vector<T> input, Vector<T> guidedGradcam, Vector<T> guidedBackprop, Matrix<T> gradcam, Tensor<T> upsampledGradcam, int targetClass, T prediction, int[] inputShape) Initializes a new Guided GradCAM explanation.

Properties

Property Summary
Matrix<T> GradCAM { get; } Gets the GradCAM component.
T Prediction { get; } Gets the prediction score.
Tensor<T> UpsampledGradCAM { get; } Gets the upsampled GradCAM.
Vector<T> GuidedBackprop { get; } Gets the Guided Backprop component.
Vector<T> GuidedGradCAM { get; } Gets the Guided GradCAM result (main output).
Vector<T> Input { get; } Gets the original input.
int TargetClass { get; } Gets the target class.
int[] InputShape { get; } Gets the input shape.

Methods

Method Summary
IEnumerable<ValueTuple<int, T>> GetTopFeatures(int k) Gets top activated features.
Tensor<T> GetGuidedGradCAMTensor() Gets the Guided GradCAM reshaped to input shape.
Vector<T> GetNormalizedGuidedGradCAM() Gets normalized Guided GradCAM (0-1 range).
string ToString() Returns string representation.