[][src]Enum rust_nb::FeatureType

pub enum FeatureType {
    Text,
    Category,
    Gaussian,
    GaussianStd,
}

Variants

Text

A multinomial feature and do word counting on feature.value.

Category

A categorical feature and will use feature.value as whole word with count 1

Gaussian

A gaussian feature that can take in continues values (f.g. 1.0, 4.2). It is calculated as an proximate gaussian distribution, with sigma calculated simply via (max - min) * default_gaussian_sigma_factor, with default_gaussian_sigma_factor as 1.0/6.0 by default and the sigma is always the same for the same Gaussian feature that is among different classes. Use this features in case you have other features such as Text or Category at the same time. Comparing with GaussianStd type below, this feature is more stable and practically more useful. Noticing that this Gaussian will be heavily influenced by prior prob if you have very unbalanced classes in training time.

GaussianStd

A standard gaussian feature that can take in continues values (f.g. 1.0, 4.2). Sigma is calculated based on the known values of this feature of a certain class. Be sure your input is really (or very close) to a gaussian distribution otherwise this feature might easily dominate other features. If you are not sure, use the Gaussian type above.

Trait Implementations

impl Clone for FeatureType[src]

impl Debug for FeatureType[src]

impl<'de> Deserialize<'de> for FeatureType[src]

impl Serialize for FeatureType[src]

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.