pub trait Distribution {
    fn from_model_params(class_count: usize, features: usize) -> Self;
    fn update_params(
        &mut self,
        data: &Matrix<f64>,
        class: usize
    ) -> LearningResult<()>; fn joint_log_lik(
        &self,
        data: &Matrix<f64>,
        class_prior: &[f64]
    ) -> LearningResult<Matrix<f64>>; }
Expand description

Naive Bayes Distribution.

Required Methods

Initialize the distribution parameters.

Updates the distribution parameters.

Compute the joint log likelihood of the data.

Returns a matrix with rows containing the probability that the input lies in each class.

Implementors