36 std::vector<std::pair<std::string, JsonValue>>
entries;
94[[nodiscard]] std::string
Base64Encode(
const std::vector<uint8_t>& bytes);
105 switch (value.
type()) {
114 if (text.find_first_of(
".eE") == std::string::npos) {
116 j =
static_cast<std::int64_t
>(value.
as_int64());
118 }
catch (
const std::invalid_argument&) {
132 j.push_back(std::move(converted));
138 for (
const auto& [key, member] : value.
as_object()) {
141 j[key] = std::move(converted);
A copyable, self-contained circuit graph: every node of one forward pass with an ablation importance ...
Definition circuit_graph.hpp:78
One JSON value: null, a boolean, a number, a string, an array or an object.
Definition json.hpp:22
Type type() const
Definition json.hpp:47
const Object & as_object() const
const Array & as_array() const
const std::string & as_string() const
const std::string & number_text() const
A number's text exactly as written or parsed, for example "0.1".
N-dimensional tensor. Owns its data buffer exclusively; a DeviceBackend* is injected (not owned) – th...
Definition tensor.hpp:29
Versioned JSON documents (pulsatrix.<kind>.v1) that every renderer reads.
A small strict JSON value, parser and deterministic writer (RFC 8259).
Definition acquisition_functions.hpp:16
JsonValue ToVegaLiteCircuitGraph(const CircuitGraphDocument &doc)
A Vega-Lite node-link view of a circuit graph: nodes in columns by depth (longest path from a source)...
void to_json(Json &j, const JsonValue &value)
Converts a JsonValue to another JSON library's value type by its common interface (assignment from nu...
Definition mime_bundle.hpp:104
MimeBundle mime_bundle_repr(const Tensor &tensor)
constexpr const char * kVegaLiteMimeType
The MIME type Jupyter front ends (JupyterLab, Notebook 7, VS Code) render Vega-Lite from....
Definition mime_bundle.hpp:28
std::string Base64Encode(const std::vector< uint8_t > &bytes)
Standard base64 (RFC 4648, with padding), for image/png data.
Viz documents for proteins (PLM-5): the mutation map, the sequence logo, the contact map and residue ...
The series document (VIZ-9): measured points with optional intervals, for sweeps and trade-off curves...
pulsatrix.attribution.v1: an Attribution's values, shape, method and metadata.
Definition document.hpp:58
An explanation result: the raw attribution values, the method that produced them, and any relevant me...
Definition attribution.hpp:23
pulsatrix.circuit_graph.v1: a CircuitGraph's scored nodes and weighted edges.
Definition document.hpp:135
How well a classifier does on a labeled dataset.
Definition performance.hpp:49
pulsatrix.counterfactual.v1: an input, its counterfactual, and what reaching the target cost (CFS-5).
Definition document.hpp:316
pulsatrix.heatmap.v1: a row-major grid of values with optional axis labels.
Definition document.hpp:79
One displayable value in several formats: MIME type to data, richest first. Text formats (text/plain,...
Definition mime_bundle.hpp:35
JsonValue to_json_value() const
The bundle as one JSON object, {"text/plain": ..., ...}.
const JsonValue * find(std::string_view mime) const
The data for mime, or nullptr.
void add(std::string mime, JsonValue data)
std::vector< std::pair< std::string, JsonValue > > entries
Definition mime_bundle.hpp:36
pulsatrix.morris.v1: Morris screening statistics per feature (CFS-4).
Definition document.hpp:350
pulsatrix.mutation_map.v1: a score for every substitution, residue by residue, such as a model's log-...
Definition protein_documents.hpp:31
pulsatrix.partial_dependence.v1: a partial dependence curve over one feature, with the individual (IC...
Definition document.hpp:239
Persistence diagrams of one point cloud, one entry per homology dimension.
Definition topology_documents.hpp:50
pulsatrix.projection.v1: inputs placed in a few dimensions (INT-5), such as their first principal com...
Definition document.hpp:398
pulsatrix.residue_tracks.v1: per-residue signals stacked under a sequence, and annotated stretches (d...
Definition protein_documents.hpp:137
pulsatrix.sensitivity.v1: how one output moves when each input feature, alone, goes to a low and a hi...
Definition document.hpp:285
pulsatrix.sequence_logo.v1: a distribution over letters at each residue, such as what a masked langua...
Definition protein_documents.hpp:62
PerSliceError()'s result.
Definition performance.hpp:155
pulsatrix.sobol.v1: first- and total-order Sobol indices per feature (CFS-4).
Definition document.hpp:365
pulsatrix.token_relevance.v1: relevance scores over the pieces of a text, in reading order....
Definition document.hpp:104
pulsatrix.training_log.v1: scalar series and the latest histogram per tag.
Definition document.hpp:168
The persistence diagram document (TDA-9): the features of each homology dimension,...