pub struct KernelPCA { /* private fields */ }Expand description
Kernel Principal Component Analysis for non-linear dimensionality reduction
Implementations§
Source§impl KernelPCA
impl KernelPCA
Sourcepub fn with_n_components(self, n_components: usize) -> Self
pub fn with_n_components(self, n_components: usize) -> Self
Set the number of components
Sourcepub fn with_kernel(self, kernel: KernelType) -> Self
pub fn with_kernel(self, kernel: KernelType) -> Self
Set the kernel function
Sourcepub fn with_max_iter(self, max_iter: usize) -> Self
pub fn with_max_iter(self, max_iter: usize) -> Self
Set the maximum number of iterations
Sourcepub fn with_fit_inverse_transform(self, fit_inverse_transform: bool) -> Self
pub fn with_fit_inverse_transform(self, fit_inverse_transform: bool) -> Self
Enable fitting of inverse transform
Sourcepub fn fit(&mut self, x: &Array2<Float>) -> Result<&mut Self, SklearsError>
pub fn fit(&mut self, x: &Array2<Float>) -> Result<&mut Self, SklearsError>
Fit the kernel PCA model to the data
Sourcepub fn transform(
&self,
x: &Array2<Float>,
) -> Result<Array2<Float>, SklearsError>
pub fn transform( &self, x: &Array2<Float>, ) -> Result<Array2<Float>, SklearsError>
Transform data to the kernel PCA space
Sourcepub fn fit_transform(
&mut self,
x: &Array2<Float>,
) -> Result<Array2<Float>, SklearsError>
pub fn fit_transform( &mut self, x: &Array2<Float>, ) -> Result<Array2<Float>, SklearsError>
Fit the model and transform the data
Sourcepub fn eigenvalues(&self) -> Option<&Array1<Float>>
pub fn eigenvalues(&self) -> Option<&Array1<Float>>
Get the eigenvalues
Sourcepub fn eigenvectors(&self) -> Option<&Array2<Float>>
pub fn eigenvectors(&self) -> Option<&Array2<Float>>
Get the eigenvectors
Sourcepub fn explained_variance_ratio(&self) -> Option<Array1<Float>>
pub fn explained_variance_ratio(&self) -> Option<Array1<Float>>
Get explained variance ratio
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelPCA
impl RefUnwindSafe for KernelPCA
impl Send for KernelPCA
impl Sync for KernelPCA
impl Unpin for KernelPCA
impl UnsafeUnpin for KernelPCA
impl UnwindSafe for KernelPCA
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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