std.belief
Generated by
sema docfromstdlib/sema/belief.sema. Import withfrom std.belief import …. For a narrative introduction see std.belief.
belief
Section titled “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.
struct Belief
Section titled “struct Belief”Fields
| field | type | descriptor |
|---|---|---|
alpha | f64 | |
beta | f64 | |
history | list[f64] |
def prior() -> Belief !{}Returns Belief
Effects !{}
prior_with
Section titled “prior_with”def prior_with(alpha: f64, beta: f64) -> Belief !{}Parameters
| name | type |
|---|---|
alpha | f64 |
beta | f64 |
Returns Belief
Effects !{}