pub struct PCA<F> { /* private fields */ }Expand description
Implementations§
Trait Implementations§
Source§impl<F: Float + Send + Sync + 'static> Fit<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ()> for PCA<F>
impl<F: Float + Send + Sync + 'static> Fit<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ()> for PCA<F>
Source§fn fit(&self, x: &Array2<F>, _y: &()) -> Result<FittedPCA<F>, FerroError>
fn fit(&self, x: &Array2<F>, _y: &()) -> Result<FittedPCA<F>, FerroError>
Fit PCA by centring the data and eigendecomposing the covariance matrix.
§Errors
FerroError::InvalidParameterifn_componentsis zero or exceeds the number of features.FerroError::InsufficientSamplesif there are fewer than 2 samples.FerroError::ConvergenceFailureif the Jacobi eigendecomposition does not converge.
Source§type Error = FerroError
type Error = FerroError
The error type returned by
fit.Source§impl<F: Float + Send + Sync + 'static> PipelineTransformer<F> for PCA<F>
impl<F: Float + Send + Sync + 'static> PipelineTransformer<F> for PCA<F>
Source§fn fit_pipeline(
&self,
x: &Array2<F>,
_y: &Array1<F>,
) -> Result<Box<dyn FittedPipelineTransformer<F>>, FerroError>
fn fit_pipeline( &self, x: &Array2<F>, _y: &Array1<F>, ) -> Result<Box<dyn FittedPipelineTransformer<F>>, FerroError>
Auto Trait Implementations§
impl<F> Freeze for PCA<F>
impl<F> RefUnwindSafe for PCA<F>where
F: RefUnwindSafe,
impl<F> Send for PCA<F>where
F: Send,
impl<F> Sync for PCA<F>where
F: Sync,
impl<F> Unpin for PCA<F>where
F: Unpin,
impl<F> UnsafeUnpin for PCA<F>
impl<F> UnwindSafe for PCA<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