Module decomposition (0.5.0)

Matrix Decomposition models. This module is styled after Scikit-Learn's decomposition module: https://scikit-learn.org/stable/modules/decomposition.html.

Classes

PCA

PCA(n_components: int = 3)

Principal component analysis (PCA).

Linear dimensionality reduction using Singular Value Decomposition of the data to project it to a lower dimensional space. The input data is centered but not scaled for each feature before applying the SVD.

It uses the LAPACK implementation of the full SVD or a randomized truncated SVD by the method of Halko et al. 2009, depending on the shape of the input data and the number of components to extract.

It can also use the scipy.sparse.linalg ARPACK implementation of the truncated SVD.

Parameter
NameDescription
n_components Optional[int], default 3

Number of components to keep. if n_components is not set all components are kept.