pulsatrix
Loading...
Searching...
No Matches
pulsatrix::AttributionWaterfallChart Class Reference

Draws a waterfall chart cascading from baseline_value to the final prediction (hc_information_visualization.md SS5: "correct for local explanation with directional attribution... bars cascade from base rate to prediction; color encodes direction; length encodes magnitude"). This is the one bar chart in this module that legitimately does not start at zero – Tufte's lie-factor rule is satisfied relative to baseline_value, the meaningful reference point, not zero. More...

#include <attribution_waterfall.hpp>

Static Public Member Functions

static void Draw (const char *title, const Attribution &attr, float baseline_value)
 

Detailed Description

Draws a waterfall chart cascading from baseline_value to the final prediction (hc_information_visualization.md SS5: "correct for local explanation with directional attribution... bars cascade from base rate to prediction; color encodes direction; length encodes magnitude"). This is the one bar chart in this module that legitimately does not start at zero – Tufte's lie-factor rule is satisfied relative to baseline_value, the meaningful reference point, not zero.

Note
Deliberately not unit-tested – see AttributionBarChart's note. All real logic (cumulative computation) lives in plot_data.hpp's ToWaterfallSteps, which is.

Member Function Documentation

◆ Draw()

static void pulsatrix::AttributionWaterfallChart::Draw ( const char *  title,
const Attribution &  attr,
float  baseline_value 
)
static
Parameters
titleImPlot plot title/id.
attrA rank-1 Attribution, in the explainer's own feature order.
baseline_valueThe starting reference value (e.g. IG's baseline prediction).

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