Skip to main content

Module fit

Module fit 

Source
Expand description

Temperature fitting on the calibration split (spec 004, 3.6).

A bounded grid search: mean log loss is evaluated at each caller-supplied temperature with the core’s own temperature/1 transformation, and the lowest loss wins, ties to the smaller temperature. It claims only the best evaluated candidate, never a global optimum. The fitted rustev.calibration/1 artifact comes with a rustev.calibration-fit/1 record binding it to its dataset, split, sources, cases and configuration, because the calibration schema has no split field and its dataset id alone never proves a disjoint evaluation. Synthetic fits establish mechanics only.

Structs§

CalibrationFit
FitTarget
The step being calibrated.

Enums§

FitError
Why nothing was fitted.
Qualification
Whether a calibration artifact is qualified for evaluating a split.

Constants§

CALIBRATION_FIT

Functions§

fit_temperature
Fit temperature/1 on the calibration split. samples are raw logits or distributions by case id.
qualify
Qualification needs the companion fit record and a different, disjoint split with no case, source or snapshot shared with the fit.