pub struct LDA<F> { /* private fields */ }Expand description
Implementations§
Trait Implementations§
Source§impl<F: Float + Send + Sync + 'static> Fit<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<usize>, Dim<[usize; 1]>>> for LDA<F>
impl<F: Float + Send + Sync + 'static> Fit<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<usize>, Dim<[usize; 1]>>> for LDA<F>
Source§fn fit(
&self,
x: &Array2<F>,
y: &Array1<usize>,
) -> Result<FittedLDA<F>, FerroError>
fn fit( &self, x: &Array2<F>, y: &Array1<usize>, ) -> Result<FittedLDA<F>, FerroError>
Fit the LDA model.
§Errors
FerroError::InsufficientSamplesif fewer than 2 samples are provided.FerroError::InvalidParameterifn_componentsis zero or exceeds the maximum allowed (min(n_classes - 1, n_features)).FerroError::ShapeMismatchifxandyhave different numbers of rows.FerroError::NumericalInstabilityifSwis singular.FerroError::ConvergenceFailureif eigendecomposition does not converge.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
fit.Source§impl PipelineEstimator<f64> for LDA<f64>
impl PipelineEstimator<f64> for LDA<f64>
Source§fn fit_pipeline(
&self,
x: &Array2<f64>,
y: &Array1<f64>,
) -> Result<Box<dyn FittedPipelineEstimator<f64>>, FerroError>
fn fit_pipeline( &self, x: &Array2<f64>, y: &Array1<f64>, ) -> Result<Box<dyn FittedPipelineEstimator<f64>>, FerroError>
Auto Trait Implementations§
impl<F> Freeze for LDA<F>
impl<F> RefUnwindSafe for LDA<F>where
F: RefUnwindSafe,
impl<F> Send for LDA<F>where
F: Send,
impl<F> Sync for LDA<F>where
F: Sync,
impl<F> Unpin for LDA<F>where
F: Unpin,
impl<F> UnsafeUnpin for LDA<F>
impl<F> UnwindSafe for LDA<F>where
F: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
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