Struct rusty_machine::learning::naive_bayes::Multinomial
source · [−]pub struct Multinomial { /* private fields */ }
Expand description
The Multinomial Naive Bayes model distribution.
Defines:
p(x|Ck) ∝ ∏i pkxi
Implementations
sourceimpl Multinomial
impl Multinomial
Trait Implementations
sourceimpl Debug for Multinomial
impl Debug for Multinomial
sourceimpl Distribution for Multinomial
impl Distribution for Multinomial
sourcefn from_model_params(class_count: usize, features: usize) -> Multinomial
fn from_model_params(class_count: usize, features: usize) -> Multinomial
Initialize the distribution parameters.
sourcefn update_params(
&mut self,
data: &Matrix<f64>,
class: usize
) -> LearningResult<()>
fn update_params(
&mut self,
data: &Matrix<f64>,
class: usize
) -> LearningResult<()>
Updates the distribution parameters.
sourcefn joint_log_lik(
&self,
data: &Matrix<f64>,
class_prior: &[f64]
) -> LearningResult<Matrix<f64>>
fn joint_log_lik(
&self,
data: &Matrix<f64>,
class_prior: &[f64]
) -> LearningResult<Matrix<f64>>
Compute the joint log likelihood of the data. Read more
Auto Trait Implementations
impl RefUnwindSafe for Multinomial
impl Send for Multinomial
impl Sync for Multinomial
impl Unpin for Multinomial
impl UnwindSafe for Multinomial
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more