Struct rusty_machine::learning::naive_bayes::Bernoulli
[−]
[src]
pub struct Bernoulli { /* fields omitted */ }
The Bernoulli Naive Bayes model distribution.
Defines:
p(x|Ck) = ∏i pkxi (1-p)k1-xi
Methods
impl Bernoulli
[src]
fn log_probs(&self) -> &Matrix<f64>
The log probability matrix.
A matrix of class by feature model log-probabilities.
Trait Implementations
impl Debug for Bernoulli
[src]
impl Distribution for Bernoulli
[src]
fn from_model_params(class_count: usize, features: usize) -> Bernoulli
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