Struct rusty_machine::learning::naive_bayes::Gaussian
[−]
[src]
pub struct Gaussian { /* 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]
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)
-> LearningResult<()>
data: &Matrix<f64>,
class: usize)
-> LearningResult<()>
Updates the distribution parameters.
fn joint_log_lik(&self,
data: &Matrix<f64>,
class_prior: &[f64])
-> LearningResult<Matrix<f64>>
data: &Matrix<f64>,
class_prior: &[f64])
-> LearningResult<Matrix<f64>>
Compute the joint log likelihood of the data. Read more