docs!: one name for score noise, and say which of beta/sigma to turn
"sigma" named three unrelated quantities: the prior standard deviation,
a distribution's own SD, and the observation noise on an observed score
margin. The third was already `score_sigma` at every config site —
`HistoryBuilder::score_sigma`, `GameOptions::score_sigma`,
`EventKind::Scored { score_sigma }` — and plain `sigma` only on
`Outcome::Scored`'s field and constructor parameter, whose own doc had
to disambiguate itself with "`sigma` overrides
`HistoryBuilder::score_sigma`". Now `score_sigma` everywhere.
The `Outcome::scores_with_sigma` / `EventBuilder::scores_with_sigma`
*method* names are left alone: renaming them is a naming choice rather
than a consistency fix, and #75 offers two candidates.
`HistoryBuilder::beta` and `::sigma` now say which is which. #75 calls
this the single most load-bearing undocumented distinction in the crate,
and it is right: nothing told a reader that `sigma` is epistemic — what
the model does not yet know, which evidence shrinks — while `beta` is
aleatoric, the day-to-day scatter no amount of evidence removes. Both
docs now name the symptom that should send you to that knob rather than
the other.
Refs #75.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011hcFjNDmHXZF8URGLku5zZ
This commit is contained in:
+34
-4
@@ -72,7 +72,22 @@ impl<T: Time, D: Drift<T>, O: Observer<T>, K: Eq + Hash + Clone> HistoryBuilder<
|
||||
self
|
||||
}
|
||||
|
||||
/// Prior standard deviation.
|
||||
/// Prior standard deviation: how unsure the model is about a competitor's
|
||||
/// **skill** before it has seen them play.
|
||||
///
|
||||
/// The first of the two noise knobs, and the one people reach for by
|
||||
/// mistake. `sigma` is *epistemic* — it is what the model does not yet
|
||||
/// know, and evidence shrinks it. [`HistoryBuilder::beta`] is *aleatoric*
|
||||
/// — how much a single showing scatters around the skill, which no amount
|
||||
/// of evidence removes.
|
||||
///
|
||||
/// So: results move ratings too slowly for your taste → raise `sigma` (or
|
||||
/// `gamma`, if the problem is that skill genuinely moves). A single upset
|
||||
/// swings ratings too far → raise `beta`, because you are telling the model
|
||||
/// that one result is weaker evidence than it assumed.
|
||||
///
|
||||
/// The default is six betas, deliberately wide: a new competitor's first
|
||||
/// result should move them a long way.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
@@ -91,7 +106,19 @@ impl<T: Time, D: Drift<T>, O: Observer<T>, K: Eq + Hash + Clone> HistoryBuilder<
|
||||
self
|
||||
}
|
||||
|
||||
/// Per-event performance noise.
|
||||
/// Per-event performance noise: how much a single showing scatters around
|
||||
/// a competitor's **skill**.
|
||||
///
|
||||
/// The second noise knob, and the one that sets the scale of the whole
|
||||
/// system — [`SIGMA`](crate::SIGMA) and [`GAMMA`](crate::GAMMA) are both
|
||||
/// defined as multiples of it. Unlike
|
||||
/// [`sigma`](HistoryBuilder::sigma), this is *aleatoric*: it is the
|
||||
/// irreducible day-to-day variation, so evidence never shrinks it. It is
|
||||
/// also what makes an upset possible at all — with `beta == 0` the better
|
||||
/// competitor always wins.
|
||||
///
|
||||
/// Larger `beta` means each result carries less information, so ratings
|
||||
/// move less per game and the draw margin implied by `p_draw` is wider.
|
||||
///
|
||||
/// # Panics
|
||||
///
|
||||
@@ -2685,8 +2712,11 @@ impl<T: Time, D: Drift<T>, O: Observer<T>, K: Eq + Hash + Clone> History<T, D, O
|
||||
kinds.push(EventKind::Ranked);
|
||||
ranks.iter().map(|&r| max_rank - r as f64).collect()
|
||||
}
|
||||
crate::Outcome::Scored { scores, sigma } => {
|
||||
let resolved = sigma.unwrap_or(self.score_sigma);
|
||||
crate::Outcome::Scored {
|
||||
scores,
|
||||
score_sigma,
|
||||
} => {
|
||||
let resolved = score_sigma.unwrap_or(self.score_sigma);
|
||||
if resolved <= 0.0 || resolved.is_nan() {
|
||||
return Err(InferenceError::InvalidParameter {
|
||||
name: "score_sigma",
|
||||
|
||||
Reference in New Issue
Block a user