compileml.bands

governance_bands

def governance_bands(latent, y, max_bands: int = 10, min_band_size: int = 2000, *, proto_min_size: int = 500, auc_max_within: float = 0.6, alpha_sep: float = 0.05, min_delta_pd: float = 0.0, enforce_monotone_pd: bool = True) -> compileml.bands.builders.BandSpec

from compileml.bands import governance_bands

Committee-facing bands: adjacent-band Welch t-test separation, a within-band residual-AUC cap, and (optionally) strictly monotone PDs.

Discovers the maximum defensible band count and applies max_bands as a ceiling only.

Parameters#

NameTypeDefaultKind
latent—requiredpositional
y—requiredpositional
max_bandsint10positional
min_band_sizeint2000positional
proto_min_sizeint500keyword-only
auc_max_withinfloat0.6keyword-only
alpha_sepfloat0.05keyword-only
min_delta_pdfloat0.0keyword-only
enforce_monotone_pdboolTruekeyword-only

Returns#

compileml.bands.builders.BandSpec

Raises#

  • RuntimeError
  • ValueError

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

Example#

python
from compileml.bands import governance_bands
 
bands = governance_bands(latent, y_train)

Worked example: governance_bands →