![]() |
OpendTect
6.3
|
Performs Pricipal Component Analysis on samples with N variables. More...
Public Member Functions | |
| PCA (int nrvars) | |
| virtual | ~PCA () |
| void | clearAllSamples () |
| template<class IDXABL > | |
| void | addSample (const IDXABL &sample) |
| bool | calculate () |
| float | getEigenValue (int idx) const |
| template<class IDXABL > | |
| void | getEigenVector (int idx, IDXABL &vec) const |
Protected Member Functions | |
| bool | tqli (float[], float[], int, ObjectSet< float > &) |
| void | tred2 (ObjectSet< float > &, int, float[], float[]) |
Protected Attributes | |
| const int | nrvars_ |
| Array2DImpl< float > | covariancematrix_ |
| ObjectSet< TypeSet< float > > | samples_ |
| TypeSet< float > | samplesums_ |
| TypeSet< Threads::Work > | workload_ |
| ObjectSet< SequentialTask > | tasks_ |
| float * | eigenvalues_ |
| int * | eigenvecindexes_ |
Performs Pricipal Component Analysis on samples with N variables.
Example of usage:
| PCA::PCA | ( | int | nrvars | ) |
| nrvars | The number of variables that the samples have. |
|
virtual |
|
inline |
Adds a sample to the analysis.
| sample | The sample that should be added. The sample can be of any type that have [] operators. |
| bool PCA::calculate | ( | ) |
Computes the pca for all added samples.
| void PCA::clearAllSamples | ( | ) |
Removes all samples so a new analysis can be made (by adding new samples)
| float PCA::getEigenValue | ( | int | idx | ) | const |
| idx | Determines which eigenvalue to return. The eigenvalues are sorted in descending order, so idx==0 gives the largest eigenvalue. |
|
inline |
Returns the eigenvector corresponding to the eigenvalue idx.
| idx | Determines which eigenvector to return. The eigenvectors are sorted in order of descending eigenvalue, so idx==0 gives the eigenvector corresponding to the largest eigenvalue. |
| vec | The object where the to store the eigenvector. Any object that has a writable [] operator can be used, for example float* and TypeSet<T>. |
|
protected |
|
protected |
|
protected |
|
protected |
The negation of the eigenval, to get the sorting right.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B. V. 2017