pub struct LinearDiscriminantAnalysis {
pub n_components: Option<usize>,
pub solver: LDASolver,
pub shrinkage: Option<f32>,
pub priors: Option<Vec<f32>>,
/* private fields */
}Expand description
Linear Discriminant Analysis
Fields§
§n_components: Option<usize>§solver: LDASolver§shrinkage: Option<f32>§priors: Option<Vec<f32>>Implementations§
Source§impl LinearDiscriminantAnalysis
impl LinearDiscriminantAnalysis
pub fn new() -> Self
pub fn n_components(self, n: usize) -> Self
pub fn shrinkage(self, s: f32) -> Self
pub fn fit(&mut self, x: &Tensor, y: &Tensor)
pub fn predict(&self, x: &Tensor) -> Tensor
pub fn transform(&self, x: &Tensor) -> Tensor
pub fn score(&self, x: &Tensor, y: &Tensor) -> f32
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LinearDiscriminantAnalysis
impl RefUnwindSafe for LinearDiscriminantAnalysis
impl Send for LinearDiscriminantAnalysis
impl Sync for LinearDiscriminantAnalysis
impl Unpin for LinearDiscriminantAnalysis
impl UnwindSafe for LinearDiscriminantAnalysis
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more