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#
| Name | Type | Default | Kind |
|---|---|---|---|
| latent | — | required | positional |
| y | — | required | positional |
| max_bands | int | 10 | positional |
| min_band_size | int | 2000 | positional |
| proto_min_size | int | 500 | keyword-only |
| auc_max_within | float | 0.6 | keyword-only |
| alpha_sep | float | 0.05 | keyword-only |
| min_delta_pd | float | 0.0 | keyword-only |
| enforce_monotone_pd | bool | True | keyword-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)