Struct rusty_machine::learning::naive_bayes::Gaussian [] [src]

pub struct Gaussian {
    // some fields omitted
}

The Gaussian Naive Bayes model distribution.

Defines:

p(x|Ck) = ∏i N(xi ; μk, σ2k)

Methods

impl Gaussian
[src]

fn theta(&self) -> &Matrix<f64>

Returns the distribution means.

This is a matrix of class by feature means.

fn sigma(&self) -> &Matrix<f64>

Returns the distribution variances.

This is a matrix of class by feature variances.

Trait Implementations

impl Debug for Gaussian
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Distribution for Gaussian
[src]

fn from_model_params(class_count: usize, features: usize) -> Gaussian

Initialize the distribution parameters.

fn update_params(&mut self, data: &Matrix<f64>, class: usize)

Updates the distribution parameters.

fn joint_log_lik(&self, data: &Matrix<f64>, class_prior: &[f64]) -> Matrix<f64>

Compute the joint log likelihood of the data. Read more