score_from_scorecard
def score_from_scorecard(scorecard: dict, row) -> int
from compileml.scorecard import score_from_scorecard
Re-derive raw_micro from the scorecard alone — the audit re-sum.
Applies the artifact's input precision, then adds base points, one bin
per feature with a main effect, and one grid cell per interaction.
Equals the runtime's raw_micro exactly, by construction.
Parameters#
| Name | Type | Default | Kind |
|---|---|---|---|
| scorecard | dict | required | positional |
| row | — | required | positional |
Returns#
int
Example#
python
from compileml.scorecard import build_scorecard, score_from_scorecard assert score_from_scorecard(build_scorecard(artifact), row) == decide(artifact, row)["latent_int"]