OpendTect
6.6
|
Performs Pricipal Component Analysis on samples with N variables. More...
Public Member Functions | |
PCA (int nrvars) | |
virtual | ~PCA () |
template<class IDXABL > | |
void | addSample (const IDXABL &sample) |
bool | calculate () |
void | clearAllSamples () |
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 | |
Array2DImpl< float > | covariancematrix_ |
float * | eigenvalues_ |
int * | eigenvecindexes_ |
const int | nrvars_ |
ObjectSet< TypeSet< float > > | samples_ |
TypeSet< float > | samplesums_ |
ObjectSet< SequentialTask > | tasks_ |
TypeSet< Threads::Work > | workload_ |
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. 1995-2022