pub struct GaussianNB { /* private fields */ }
Expand description
A Gaussian Naive Bayes classifier.
§Parameters
var_smoothing
: Portion of the largest variance of all features to add to variances for stability.use_unbiased_variance
: Iftrue
, uses Bessel’s correction (dividing by (n-1)); otherwise divides by n.
Implementations§
Source§impl GaussianNB
impl GaussianNB
Sourcepub fn new(var_smoothing: f64, use_unbiased_variance: bool) -> Self
pub fn new(var_smoothing: f64, use_unbiased_variance: bool) -> Self
Create a new GaussianNB.
§Arguments
var_smoothing
- small float added to variances for numerical stability.use_unbiased_variance
- whether to apply Bessel’s correction (divide by n-1).
Auto Trait Implementations§
impl Freeze for GaussianNB
impl RefUnwindSafe for GaussianNB
impl Send for GaussianNB
impl Sync for GaussianNB
impl Unpin for GaussianNB
impl UnwindSafe for GaussianNB
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more