pub struct KernelPCA { /* private fields */ }Expand description
Kernel PCA model.
Implementations§
Source§impl KernelPCA
impl KernelPCA
Sourcepub fn fit<K: Kernel + ?Sized>(
data: &[Vec<f64>],
kernel: &K,
config: KernelPCAConfig,
) -> Result<Self>
pub fn fit<K: Kernel + ?Sized>( data: &[Vec<f64>], kernel: &K, config: KernelPCAConfig, ) -> Result<Self>
Sourcepub fn transform<K: Kernel + ?Sized>(
&self,
data: &[Vec<f64>],
kernel: &K,
) -> Result<Vec<Vec<f64>>>
pub fn transform<K: Kernel + ?Sized>( &self, data: &[Vec<f64>], kernel: &K, ) -> Result<Vec<Vec<f64>>>
Sourcepub fn transform_training<K: Kernel + ?Sized>(
&self,
kernel: &K,
) -> Result<Vec<Vec<f64>>>
pub fn transform_training<K: Kernel + ?Sized>( &self, kernel: &K, ) -> Result<Vec<Vec<f64>>>
Transform the training data (convenience method).
Sourcepub fn eigenvalues(&self) -> &[f64]
pub fn eigenvalues(&self) -> &[f64]
Get the eigenvalues.
Sourcepub fn explained_variance_ratio(&self) -> Vec<f64>
pub fn explained_variance_ratio(&self) -> Vec<f64>
Get the explained variance ratio for each component.
Sourcepub fn cumulative_variance_explained(&self) -> Vec<f64>
pub fn cumulative_variance_explained(&self) -> Vec<f64>
Get the cumulative explained variance.
Sourcepub fn n_components(&self) -> usize
pub fn n_components(&self) -> usize
Get the number of components.
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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