gsl::PCA Class Reference

This class implements Principal Component Analysis. More...

`#include <mia/core/gsl_pca.hh>`

## Data Structures

struct | Result

## Public Member Functions

Result | analyze (const Matrix &signal) const
| PCA (unsigned max_pc, double energy_thresh_ratio)
void | set_eigenvalue_minimum (double min)

## Detailed Description

This class implements Principal Component Analysis.

This class implements Principal Component Analysis by using the covariance matrix. The number of principal components to be evaluated can be defined in two ways: Either a hard number is given in the constructor, or the energy ratio is defined. In both cases PC are added starting from the component with the eigenvalue with the largest absolute value of the covariance matrix. In the first case the requested number of components is returned, unless smaller eigenvalues have a lower value than a given threshold value (default 1e-9). In the energy-ratio based case values are added as long as the ratio of the sum of the added eigenvalues with respect to the sum of all eigenvalues is below the user-defined ratio.

Definition at line 48 of file gsl_pca.hh.

## Constructor & Destructor Documentation

## PCA()

gsl::PCA::PCA | ( | unsigned | max_pc,
|  | double | energy_thresh_ratio )

Construct the PCA analysis

Parameters

  max_pc | maximum number of principal components to be returned. if this parameter is set to zero, then the number is estimated based on the energy ration given in the secons parameter
  energy_thresh_ratio | - if the number of principal components is to be evaluated automatically, then this value defines the condition when to stop adding components. The value must be in the range (0,1).

## Member Function Documentation

## analyze()

Result gsl::PCA::analyze | ( | const Matrix & | signal | ) | const

Run the PCA on a given input data set.

Parameters

  signal | the input data the signals to be separated are stored in the columns

## set_eigenvalue_minimum()

void gsl::PCA::set_eigenvalue_minimum | ( | double | min | ) |

Set an alternative threshold for eigenvalues to be ignored.

Parameters

  min | new minimum for acceptable eigenvalue values.

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

- gsl_pca.hh