compileml.runtime — primitives
latent_from_raw
def latent_from_raw(raw_micro: int, micro_scale: int, scale: int) -> tuple[int, int]
from compileml.runtime import latent_from_raw
Clamp a raw score and convert to display scale (spec §4).
Returns (latent_micro, latent_int).
Parameters#
| Name | Type | Default | Kind |
|---|---|---|---|
| raw_micro | int | required | positional |
| micro_scale | int | required | positional |
| scale | int | required | positional |
Returns#
tuple[int, int]