[−][src]Struct smartcore::decomposition::pca::PCA
Principal components analysis algorithm
Implementations
impl<T: RealNumber, M: Matrix<T>> PCA<T, M>
[src]
pub fn fit(data: &M, parameters: PCAParameters) -> Result<PCA<T, M>, Failed>
[src]
Fits PCA to your data.
data
- NxM matrix with N observations and M features in each observation.n_components
- number of components to keep.parameters
- other parameters, useDefault::default()
to set parameters to default values.
pub fn transform(&self, x: &M) -> Result<M, Failed>
[src]
Run dimensionality reduction for x
x
- KxM data where K is number of observations and M is number of features.
pub fn components(&self) -> &M
[src]
Get a projection matrix
Trait Implementations
impl<T: Debug + RealNumber, M: Debug + Matrix<T>> Debug for PCA<T, M>
[src]
impl<'de, T: RealNumber, M: Matrix<T>> Deserialize<'de> for PCA<T, M> where
T: Deserialize<'de>,
M: Deserialize<'de>,
[src]
T: Deserialize<'de>,
M: Deserialize<'de>,
pub fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl<T: RealNumber, M: Matrix<T>> PartialEq<PCA<T, M>> for PCA<T, M>
[src]
pub fn eq(&self, other: &Self) -> bool
[src]
#[must_use]pub fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
impl<T: RealNumber, M: Matrix<T>> Serialize for PCA<T, M> where
T: Serialize,
M: Serialize,
[src]
T: Serialize,
M: Serialize,
pub fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<T: RealNumber, M: Matrix<T>> Transformer<M> for PCA<T, M>
[src]
impl<T: RealNumber, M: Matrix<T>> UnsupervisedEstimator<M, PCAParameters> for PCA<T, M>
[src]
Auto Trait Implementations
impl<T, M> RefUnwindSafe for PCA<T, M> where
M: RefUnwindSafe,
T: RefUnwindSafe,
[src]
M: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, M> Send for PCA<T, M> where
M: Send,
T: Send,
[src]
M: Send,
T: Send,
impl<T, M> Sync for PCA<T, M> where
M: Sync,
T: Sync,
[src]
M: Sync,
T: Sync,
impl<T, M> Unpin for PCA<T, M> where
M: Unpin,
T: Unpin,
[src]
M: Unpin,
T: Unpin,
impl<T, M> UnwindSafe for PCA<T, M> where
M: UnwindSafe,
T: UnwindSafe,
[src]
M: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,