baseline_staleness
def baseline_staleness(artifact, X_reference, X_current) -> dict
from compileml.monitor import baseline_staleness
How far the frozen baseline has moved in population rank, per feature.
The baseline is both the imputation value and the attribution reference point, so it matters when it stops describing the population. Raw deltas are not comparable across features, so this measures rank: the baseline's percentile among non-missing values in each population, with ties counted half, and the shift between them. Missing rates are reported alongside, because a missing value is imputed at the baseline.
Features are ranked by absolute percentile shift. No pass/fail threshold is applied.
Parameters#
| Name | Type | Default | Kind |
|---|---|---|---|
| artifact | — | required | positional |
| X_reference | — | required | positional |
| X_current | — | required | positional |
Returns#
dict
Raises#
- ValueError
Read from the function body and the private helpers it calls, not inferred. A function that raises nothing has no section here.