pulsatrix
Loading...
Searching...
No Matches
pulsatrix::Attribution Struct Reference

An explanation result: the raw attribution values, the method that produced them, and any relevant metadata (charter Part 2 SS4). More...

#include <attribution.hpp>

Collaboration diagram for pulsatrix::Attribution:

Public Attributes

std::string method
 Which explanation method produced this result (e.g. "saliency", "grad_cam").
 
Tensor values
 The raw attribution values, same shape as the explained input (or a method-specific shape, e.g. Grad-CAM's per-channel map).
 
std::unordered_map< std::string, std::string > metadata
 Method-specific metadata (e.g. {"baseline", "zero"} for Integrated Gradients).
 

Detailed Description

An explanation result: the raw attribution values, the method that produced them, and any relevant metadata (charter Part 2 SS4).

Note
Deliberately not just a Tensor – downstream code (audit tooling, a future viz layer) shouldn't have to guess what produced a number. metadata is a simple string-keyed map (e.g. baseline description for Integrated Gradients, kernel width for LIME) – no richer variant type until a real method actually needs one.

Member Data Documentation

◆ metadata

std::unordered_map<std::string, std::string> pulsatrix::Attribution::metadata

Method-specific metadata (e.g. {"baseline", "zero"} for Integrated Gradients).

◆ method

std::string pulsatrix::Attribution::method

Which explanation method produced this result (e.g. "saliency", "grad_cam").

◆ values

Tensor pulsatrix::Attribution::values

The raw attribution values, same shape as the explained input (or a method-specific shape, e.g. Grad-CAM's per-channel map).


The documentation for this struct was generated from the following file: