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

Draws a beeswarm plot for one feature's attribution values across many samples/predictions – the global "how does the model behave overall" view (hc_information_visualization.md SS5), complementing AttributionBarChart's single-prediction "why this one" view. More...

#include <attribution_beeswarm.hpp>

Static Public Member Functions

static void Draw (const char *title, const std::vector< Attribution > &attributions_across_samples, int64_t feature_index)
 

Detailed Description

Draws a beeswarm plot for one feature's attribution values across many samples/predictions – the global "how does the model behave overall" view (hc_information_visualization.md SS5), complementing AttributionBarChart's single-prediction "why this one" view.

Note
ImPlot has no native beeswarm primitive – the jitter/collision-avoidance layout is computed by plot_data.hpp's ToBeeswarmPoints (unit-tested); this draw call only plots already-jittered points. Colors by the attribution value's own sign/magnitude (DivergingColormap) rather than the original feature value, since Attribution does not carry the input feature value alongside its attribution – a real limitation relative to a canonical SHAP beeswarm's color encoding, not an oversight.
Deliberately not unit-tested – see AttributionBarChart's note.

Member Function Documentation

◆ Draw()

static void pulsatrix::AttributionBeeswarmView::Draw ( const char *  title,
const std::vector< Attribution > &  attributions_across_samples,
int64_t  feature_index 
)
static
Parameters
titleImPlot plot title/id.
attributions_across_samplesOne Attribution per sample/prediction.
feature_indexWhich feature (element position) to plot.

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