pulsatrix 1.1.0
Loading...
Searching...
No Matches
pulsatrix::ExplainerCapabilities Struct Reference

One explainer's declaration: what it answers and what it needs. More...

#include <explainer_capabilities.hpp>

Public Member Functions

bool answers (XaiQuestion question) const
 Whether question is among questions.
 

Public Attributes

std::string name
 A stable identifier, the class or function name: "IntegratedGradients".
 
std::string header
 The header to include: "pulsatrix/integrated_gradients.hpp".
 
std::vector< std::string > entry_points
 The calls that run it: "IntegratedGradients::explain".
 
std::string summary
 One sentence on what it computes.
 
std::vector< XaiQuestion > questions
 The questions it answers, the main one first.
 
ExplanationScope scope = ExplanationScope::Local
 
ModelAccess access = ModelAccess::BlackBox
 
InputKind input = InputKind::Any
 
bool attribution = false
 It returns an Attribution with one value per input element, so the metrics in explanation_metrics.hpp (deletion, insertion, randomization, sparseness) apply.
 
bool complete = false
 The attributions add up to the output, minus a baseline's where there is one: LRP's conservation, Integrated Gradients' completeness, Shapley values' efficiency. It can be checked on every explanation (ComputeConservation()), and LRP's ε rules keep it only approximately.
 
bool needs_base_model = false
 It compares a model with the one it was fine-tuned from, so it needs both.
 
bool needs_labels = false
 It scores the model against true labels (the Performance metrics, conformal calibration), so it needs a labeled dataset (ModelTraits::has_labels).
 
int64_t max_features = 0
 The most input features it can take, or 0 for no limit: KernelSHAP enumerates every coalition, so it takes at most 20.
 

Detailed Description

One explainer's declaration: what it answers and what it needs.

Member Function Documentation

◆ answers()

bool pulsatrix::ExplainerCapabilities::answers ( XaiQuestion  question) const

Whether question is among questions.

Member Data Documentation

◆ access

ModelAccess pulsatrix::ExplainerCapabilities::access = ModelAccess::BlackBox

◆ attribution

bool pulsatrix::ExplainerCapabilities::attribution = false

It returns an Attribution with one value per input element, so the metrics in explanation_metrics.hpp (deletion, insertion, randomization, sparseness) apply.

◆ complete

bool pulsatrix::ExplainerCapabilities::complete = false

The attributions add up to the output, minus a baseline's where there is one: LRP's conservation, Integrated Gradients' completeness, Shapley values' efficiency. It can be checked on every explanation (ComputeConservation()), and LRP's ε rules keep it only approximately.

◆ entry_points

std::vector<std::string> pulsatrix::ExplainerCapabilities::entry_points

The calls that run it: "IntegratedGradients::explain".

◆ header

std::string pulsatrix::ExplainerCapabilities::header

The header to include: "pulsatrix/integrated_gradients.hpp".

◆ input

InputKind pulsatrix::ExplainerCapabilities::input = InputKind::Any

◆ max_features

int64_t pulsatrix::ExplainerCapabilities::max_features = 0

The most input features it can take, or 0 for no limit: KernelSHAP enumerates every coalition, so it takes at most 20.

◆ name

std::string pulsatrix::ExplainerCapabilities::name

A stable identifier, the class or function name: "IntegratedGradients".

◆ needs_base_model

bool pulsatrix::ExplainerCapabilities::needs_base_model = false

It compares a model with the one it was fine-tuned from, so it needs both.

◆ needs_labels

bool pulsatrix::ExplainerCapabilities::needs_labels = false

It scores the model against true labels (the Performance metrics, conformal calibration), so it needs a labeled dataset (ModelTraits::has_labels).

◆ questions

std::vector<XaiQuestion> pulsatrix::ExplainerCapabilities::questions

The questions it answers, the main one first.

◆ scope

ExplanationScope pulsatrix::ExplainerCapabilities::scope = ExplanationScope::Local

◆ summary

std::string pulsatrix::ExplainerCapabilities::summary

One sentence on what it computes.


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