Principal component analysis.
More...
#include <PCA.hpp>
|
| PCA (MatrixD data) |
| Principal component analysis algorithm. More...
|
|
void | fit () |
| Finds the principal components of a Matrix. More...
|
|
MatrixD | transform () |
| Rotates the data set, using the eigenvectors of the covariance matrix as the new base. More...
|
|
MatrixD | transform (int numComponents) |
| Rotates the data set, using the eigenvectors of the covariance matrix with the largest eigenvalues as the new base. More...
|
|
const MatrixD & | getEigenvalues () const |
|
const MatrixD & | getEigenvectors () const |
|
const MatrixD & | getPercentages () const |
|
const MatrixD & | getCumPercentages () const |
|
Principal component analysis.
Definition at line 18 of file PCA.hpp.
◆ PCA()
Principal component analysis algorithm.
- Parameters
-
data | the matrix whose principal components will be found |
Definition at line 28 of file PCA.hpp.
◆ fit()
Finds the principal components of a Matrix.
Eigenvectors and eigenvalues are found via the Jacobi eigenvalue algorithm
Definition at line 35 of file PCA.hpp.
◆ getCumPercentages()
const MatrixD& PCA::getCumPercentages |
( |
| ) |
const |
|
inline |
◆ getEigenvalues()
const MatrixD& PCA::getEigenvalues |
( |
| ) |
const |
|
inline |
◆ getEigenvectors()
const MatrixD& PCA::getEigenvectors |
( |
| ) |
const |
|
inline |
◆ getPercentages()
const MatrixD& PCA::getPercentages |
( |
| ) |
const |
|
inline |
◆ transform() [1/2]
MatrixD PCA::transform |
( |
| ) |
|
|
inline |
Rotates the data set, using the eigenvectors of the covariance matrix as the new base.
- Returns
- the original dataset rotated using the eigenvectors of the covariance matrix as the new base
Definition at line 60 of file PCA.hpp.
◆ transform() [2/2]
MatrixD PCA::transform |
( |
int |
numComponents | ) |
|
|
inline |
Rotates the data set, using the eigenvectors of the covariance matrix with the largest eigenvalues as the new base.
- Returns
- the original dataset rotated using the eigenvectors of the covariance matrix with the largest eigenvalues as the new base
Definition at line 68 of file PCA.hpp.
◆ cumPercentages
MatrixD PCA::cumPercentages |
|
private |
◆ eigenvalues
◆ eigenvectors
MatrixD PCA::eigenvectors |
|
private |
◆ percentages
The documentation for this class was generated from the following file: