GuidedBackpropExplanation<T>
Models & Types · AiDotNet.Interpretability.Explainers
Result of Guided Backpropagation explanation.
Constructors
| Constructor |
Summary |
GuidedBackpropExplanation(Vector<T> input, Vector<T> guidedGradients, int targetClass, T prediction, int[] inputShape, Tensor<T> gradientTensor) |
Initializes a new explanation. |
Properties
| Property |
Summary |
T Prediction { get; } |
Gets the prediction for the target class. |
Tensor<T> GradientTensor { get; } |
Gets the gradient tensor (for tensor inputs). |
Vector<T> GuidedGradients { get; } |
Gets the guided gradients (attributions). |
Vector<T> Input { get; } |
Gets the original input. |
int TargetClass { get; } |
Gets the target class that was explained. |
int[] InputShape { get; } |
Gets the input shape (for tensor inputs). |
Methods
| Method |
Summary |
IEnumerable<ValueTuple<int, T>> GetTopFeatures(int k) |
Gets the most important input features. |
Vector<T> GetNormalizedGradients() |
Normalizes gradients to [0, 1] range. |
string ToString() |
Returns string representation. |