Skip to content

Generated by sema doc from stdlib/sema/belief.sema. Import with from std.belief import …. For a narrative introduction see std.belief.

std.belief — Beta-Bernoulli confidence tracking (design ⑤).

A first-class calibrated-confidence type: each observation is a soft Bernoulli update (alpha += conf, beta += 1 - conf). Replaces a hand-rolled ~120-line BeliefTracker. The prior is parametrizable — prior() is the uniform Beta(1,1); prior_with(a, b) sets any prior — nothing about the distribution is hardcoded in the runtime.

Fields

fieldtypedescriptor
alphaf64
betaf64
historylist[f64]
def prior() -> Belief !{}

Returns Belief

Effects !{}

def prior_with(alpha: f64, beta: f64) -> Belief !{}

Parameters

nametype
alphaf64
betaf64

Returns Belief

Effects !{}