|
pulsatrix 1.1.0
|
What each explainer answers: the nine question categories (Liao, Gruen and Miller, CHI 2020), the four reasons to explain (Adadi and Berrada, 2018), and a machine-readable declaration of every explainer's question, scope, model access and inputs (XAI-1). More...
#include <cstdint>#include <optional>#include <string>#include <string_view>#include <vector>#include "pulsatrix/json.hpp"

Go to the source code of this file.
Classes | |
| struct | pulsatrix::ExplainerCapabilities |
| One explainer's declaration: what it answers and what it needs. More... | |
Namespaces | |
| namespace | pulsatrix |
Functions | |
| std::string_view | pulsatrix::QuestionText (XaiQuestion question) |
| The question as Liao et al. phrase it, for example "Why is this instance given this
prediction?". | |
| std::string_view | pulsatrix::ReasonText (XaiReason reason) |
| One sentence on the reason. | |
| const std::vector< XaiQuestion > & | pulsatrix::AllXaiQuestions () |
| All nine questions, in the enum's order. | |
| const std::vector< XaiReason > & | pulsatrix::AllXaiReasons () |
| All four reasons, in the enum's order. | |
| const std::vector< ExplainerCapabilities > & | pulsatrix::ExplainerCatalog () |
| Every explainer pulsatrix has, in a fixed order. | |
| const ExplainerCapabilities & | pulsatrix::ExplainerCapabilitiesOf (std::string_view name) |
The catalog entry named name. | |
| std::vector< const ExplainerCapabilities * > | pulsatrix::ExplainersFor (XaiQuestion question) |
The explainers that answer question: those that list it first, then the rest, each group in catalog order. Empty for a question pulsatrix has no explainer for yet. | |
| JsonValue | pulsatrix::ToJson (const ExplainerCapabilities &capabilities) |
| The declaration as a JSON object, with the enums as their to_string() names. | |
| JsonValue | pulsatrix::ExplainerCatalogDocument () |
The whole catalog: a pulsatrix.explainer_catalog.v1 document. | |
Names. Lower-case snake case, as in reports and JSON: "how_global", "justify". | |
| std::string_view | pulsatrix::to_string (XaiQuestion question) |
| std::string_view | pulsatrix::to_string (XaiReason reason) |
| std::string_view | pulsatrix::to_string (ExplanationScope scope) |
| std::string_view | pulsatrix::to_string (ModelAccess access) |
| std::string_view | pulsatrix::to_string (InputKind input) |
Parsing. The inverse of to_string(); std::nullopt for any other text. | |
| std::optional< XaiQuestion > | pulsatrix::ParseXaiQuestion (std::string_view text) |
| std::optional< XaiReason > | pulsatrix::ParseXaiReason (std::string_view text) |
What each explainer answers: the nine question categories (Liao, Gruen and Miller, CHI 2020), the four reasons to explain (Adadi and Berrada, 2018), and a machine-readable declaration of every explainer's question, scope, model access and inputs (XAI-1).
Pulsatrix's explainers are separate classes and free functions with different signatures, so the declarations live in one catalog, ExplainerCatalog(). The classes with an explain() method also return their own entry from a static capabilities().