NAG C++ classes for Hyperspectral Imaging  0.1
Public Member Functions | Data Fields
nag::pca_results< FPType > Struct Template Reference

A type used to hold the details of a principal component analysis. More...

#include <SpecImage.hpp>

Public Member Functions

 pca_results (pca_results &&a)
 Move constructor. More...
 
 pca_results ()=default
 Default constructor. More...
 
pca_resultsoperator= (pca_results &&a)
 Move assignment operator. More...
 

Data Fields

int k
 The number of principal components found. More...
 
size_t m
 The number of rows of the matrix. More...
 
size_t n
 The number of columns of the matrix. More...
 
FPType pca_tot
 The sum total variance for all of the components. More...
 
std::unique_ptr< FPType[], cfreeloadings
 The n by k PCA loadings matrix, stored in column-major ordering. The loadings are returned in decreasing order of variance. More...
 
std::unique_ptr< FPType[], cfreescores
 The m by k PCA scores matrix, stored in column-major ordering. More...
 
std::vector< FPType > eigenvalues
 The eigenvalues vector of length k corresponding to the variance accounted for in the \(i\)th component (i.e. the \(i\)th column of the loadings matrix). Thus the fraction of the variance accounted for in this component is given by eigenvalues[i]/pca_tot. More...
 

Detailed Description

template<class FPType>
struct nag::pca_results< FPType >

A type used to hold the details of a principal component analysis.

For more information see: nag::SpecImage::pca.

Constructor & Destructor Documentation

template<class FPType>
nag::pca_results< FPType >::pca_results ( pca_results< FPType > &&  a)
inline

Move constructor.

template<class FPType>
nag::pca_results< FPType >::pca_results ( )
default

Default constructor.

Member Function Documentation

template<class FPType>
pca_results& nag::pca_results< FPType >::operator= ( pca_results< FPType > &&  a)
inline

Move assignment operator.

Field Documentation

template<class FPType>
std::vector<FPType> nag::pca_results< FPType >::eigenvalues

The eigenvalues vector of length k corresponding to the variance accounted for in the \(i\)th component (i.e. the \(i\)th column of the loadings matrix). Thus the fraction of the variance accounted for in this component is given by eigenvalues[i]/pca_tot.

template<class FPType>
int nag::pca_results< FPType >::k

The number of principal components found.

template<class FPType>
std::unique_ptr<FPType[], cfree> nag::pca_results< FPType >::loadings

The n by k PCA loadings matrix, stored in column-major ordering. The loadings are returned in decreasing order of variance.

template<class FPType>
size_t nag::pca_results< FPType >::m

The number of rows of the matrix.

template<class FPType>
size_t nag::pca_results< FPType >::n

The number of columns of the matrix.

template<class FPType>
FPType nag::pca_results< FPType >::pca_tot

The sum total variance for all of the components.

template<class FPType>
std::unique_ptr<FPType[], cfree> nag::pca_results< FPType >::scores

The m by k PCA scores matrix, stored in column-major ordering.


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