Skip to main content

bayesian_update

Function bayesian_update 

Source
pub fn bayesian_update(current_confidence: f64, corroborate: bool) -> f64
Expand description

Bayesian update using Beta-Binomial conjugate prior.

Given a current confidence (interpreted as alpha / (alpha + beta) with total pseudocount), updates the posterior by adding one observation.

  • corroborate = true: alpha += 1 (evidence supports the relationship)
  • corroborate = false: beta += 1 (evidence contradicts the relationship)