compileml.viz

band_drivers

def band_drivers(decisions: list[dict], *, y=None, target_band: str = 'all', cols: int = 3, top_codes: int = 10, point_size: int = 6, alpha_good: float = 0.65, alpha_bad: float = 0.75, y_jitter: float = 0.34, xj_base: float = 0.06, xj_max: float = 0.18, seed: int = 0, colors: dict | None = None, color_by: str = 'auto')

from compileml.viz import band_drivers

Band-conditioned decision drivers (faceted beeswarm by band).

Original design, payload-driven: one panel per band, each ranking its own top reason codes by mean absolute impact. Returns (figure, axes).

Parameters#

NameTypeDefaultKind
decisionslist[dict]requiredpositional
y—Nonekeyword-only
target_bandstr'all'keyword-only
colsint3keyword-only
top_codesint10keyword-only
point_sizeint6keyword-only
alpha_goodfloat0.65keyword-only
alpha_badfloat0.75keyword-only
y_jitterfloat0.34keyword-only
xj_basefloat0.06keyword-only
xj_maxfloat0.18keyword-only
seedint0keyword-only
colorsdict | NoneNonekeyword-only
color_bystr'auto'keyword-only

Raises#

  • ValueError

Read from the function body and the private helpers it calls, not inferred. A function that raises nothing has no section here.