LayerAttributionResult<T>
Models & Types · AiDotNet.Interpretability.Explainers
Result of layer attribution.
Constructors
| Constructor |
Summary |
LayerAttributionResult() |
|
Properties
| Property |
Summary |
LayerAttributionMethod Method { get; set; } |
Gets or sets the attribution method used. |
Vector<T> Activations { get; set; } |
Gets or sets the layer activations. |
Vector<T> Attributions { get; set; } |
Gets or sets attribution scores for each neuron in the layer. |
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. |
Methods
| Method |
Summary |
IEnumerable<ValueTuple<int, T, T>> GetTopNeurons(int k) |
Gets the top K neurons by attribution magnitude. |
T GetAttributionSum() |
Gets the sum of attributions. |
Tensor<T> ReshapeSpatial(int height, int width, int channels) |
Reshapes attributions for spatial layers (e.g., conv layers). |
Vector<T> GetChannelAttributions(int height, int width, int channels) |
Gets channel-wise attribution sums (for conv layers). |
string ToString() |
Returns a human-readable summary. |