yat  0.18pre
theplu::yat::utility::KernelPCA Class Reference

Principal Component Analysis on a Kernel Matrix. More...

`#include <yat/utility/KernelPCA.h>`

## Public Member Functions

KernelPCA (const Matrix &kernel)

virtual ~KernelPCA (void)
destructor

const Vectoreigenvalues (void) const
sorted eigenvalues. More...

const Matrixprojection (void) const

## Detailed Description

Principal Component Analysis on a Kernel Matrix.

This class performs PCA on a kernel matrix. Note that this class does not diagonalize the kernel matrix to find eigen-samples that maximizes the variance (use class SVD). Instead, this class finds eigen-features that maximizes the variance in feature space and projects the data onto these eigen-features.

As the covariance of features is not available nor is the data, we create a data matrix Z that fulfills Kernel = Z' * Z. As this data matrix Z has the same kernel matrix as the original data and thus also same distances between each pair of sample, the difference between Z and original data matrix is at most a rotation and translation. Hence, the projection of Z onto the first principial components will be equivalent to the projection of original data onto its principal components.

PCA
Since
New in yat 0.7

## Constructor & Destructor Documentation

 theplu::yat::utility::KernelPCA::KernelPCA ( const Matrix & kernel )
explicit

Constructor taking the kernel matrix as input. kernel is expected to be symmetric and positive semi-definite.

The kernel matrix contains the scalar product between all samples, i.e., element kernel(i,j) is the scalar product between sample i and sample j.

## Member Function Documentation

 const Vector& theplu::yat::utility::KernelPCA::eigenvalues ( void ) const

sorted eigenvalues.

Returns
eigenvalues sorted such eignenvalues(0) is the largest value
 const Matrix& theplu::yat::utility::KernelPCA::projection ( void ) const

This function will project data onto the new coordinate-system.

Each column corresponds to a sample.

The documentation for this class was generated from the following file:

Generated on Sun Sep 27 2020 02:26:14 for yat by 1.8.11