Read the equation
This relation defines (calibrated in the source section “func Train(ctx context.Context, pool *pgxpool.Pool, modelKey string, l2 float64, minEvents int, dryRun bool) (TrainResult, error) · (calibrated”. It specifies the displayed relationship between the named quantities or parameters. Its interpretation depends on the source’s stated variables and conditions; this record does not assign an unprovided physical or cognitive meaning to them.
Terms & definitions
The recovered passage does not supply a separate symbol table. Read the source context for the notation used in this version; familiar letters may carry different meanings in other builds.
How it works
Read (calibrated as the quantity being defined or updated by this relation.
Substitute the source-defined variables or recorded values and follow the displayed arithmetic and indexing exactly.
Use this version’s variable definitions and update order. The same symbol may be assigned a different meaning in another build.
Assumptions & limits
This source expression was recovered from the pinned code revision. Its presence does not establish that the associated program was built, run, or scientifically validated.
Original context
Read the surrounding source passage
res.Version = version
return res, nil
}
// materializeCalibration fits Platt scaling on the in sample log odds and materializes it into monotone
// calibration bins over the raw probability range [0, 1], the shape aedt_calibration_bins stores and the serve
// path looks up. For each bin the empirical rate is the Platt calibrated probability at the bin midpoint
// (calibrated = sigmoid(a * logit(mid) + b)). A Platt fit failure returns no bins, the honest identity map.
func materializeCalibration(etas []float64, y []int, binCount int) []Bin {
a, b, err := learn.FitPlatt(etas, y)
if err != nil {
return nil
}
bins := make([]Bin, 0, binCount)
for k := 0; k < binCount; k++ {
lo := float64(k) / float64(binCount)
hi := float64(k+1) / float64(binCount)
mid := (lo + hi) / 2Exact original notation
(calibrated = sigmoid(a * logit(mid) + b)). A Platt fit failure returns no bins, the honest identity map.