Skip to main content

fit

Function fit 

Source
pub fn fit(
    data: &[f64],
    mu0: f64,
    lambda0: f64,
    a0: f64,
    b0: f64,
    max_iter: usize,
    tol: f64,
) -> Result<VariationalGaussian, LearningError>
Expand description

Run CAVI for the univariate Gaussian. Priors: μ ~ N(μ0, (λ0·τ)⁻¹) (mu0, lambda0), τ ~ Gamma(a0, b0). Fails closed on too little data.