[][src]Struct rust_nb::Model

pub struct Model<T: ModelStore + Sync> { /* fields omitted */ }

Methods

impl<T: ModelStore + Sync> Model<T>[src]

pub fn with_stop_words_file(self, stop_words_file: &str) -> Self[src]

pub fn with_default_gaussian_m2(self, default_gaussian_m2: f64) -> Self[src]

pub fn with_pseudo_count(self, pseudo_count: f64) -> Self[src]

pub fn with_prior_factor(self, prior_factor: f64) -> Self[src]

pub fn with_default_gaussian_sigma_factor(
    self,
    default_gaussian_sigma_factor: f64
) -> Self
[src]

pub fn train(
    &mut self,
    model_name: &str,
    class_feature_pairs: &[(String, Vec<Feature>)]
)
[src]

pub fn predict(
    &self,
    model_name: &str,
    features: &[Feature]
) -> HashMap<String, f64>
[src]

pub fn predict_batch(
    &self,
    model_name: &str,
    features_vec: &[Vec<Feature>]
) -> Vec<HashMap<String, f64>>
[src]

impl Model<ModelHashMapStore>[src]

Trait Implementations

impl<'de, T: ModelStore + Sync> Deserialize<'de> for Model<T> where
    T: Deserialize<'de>, 
[src]

impl<T: ModelStore + Sync> Serialize for Model<T> where
    T: Serialize
[src]

Auto Trait Implementations

impl<T> !RefUnwindSafe for Model<T>

impl<T> Send for Model<T> where
    T: Send

impl<T> Sync for Model<T>

impl<T> Unpin for Model<T> where
    T: Unpin

impl<T> UnwindSafe for Model<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.