latest version v1.9 - last update 10 Apr 2010 |
the parameters for the class principalComponents More...
#include <ltiPCA.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const char * | getTypeName () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual functor::parameters * | clone () const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
Public Attributes | |
int | resultDim |
bool | autoDim |
bool | useCorrelation |
bool | whitening |
eigenSystem< T > * | eigen |
T | relevance |
bool | centerData |
bool | useSVD |
singularValueDecomp< T > * | svd |
the parameters for the class principalComponents
lti::principalComponents< T >::parameters::parameters | ( | void | ) | [inline] |
default constructor
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::autoDim, lti::principalComponents< T >::parameters::centerData, lti::principalComponents< T >::parameters::eigen, lti::principalComponents< T >::parameters::relevance, lti::principalComponents< T >::parameters::resultDim, lti::principalComponents< T >::parameters::svd, lti::principalComponents< T >::parameters::useCorrelation, lti::principalComponents< T >::parameters::useSVD, and lti::principalComponents< T >::parameters::whitening.
Referenced by lti::principalComponents< T >::parameters::clone().
lti::principalComponents< T >::parameters::parameters | ( | const parameters & | other | ) | [inline] |
copy constructor
other | the parameters object to be copied |
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::eigen, and lti::principalComponents< T >::parameters::svd.
lti::principalComponents< T >::parameters::~parameters | ( | ) | [inline, virtual] |
destructor
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::eigen.
virtual functor::parameters* lti::principalComponents< T >::parameters::clone | ( | ) | const [inline, virtual] |
returns a pointer to a clone of the parameters
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::parameters().
parameters& lti::principalComponents< T >::parameters::copy | ( | const parameters & | other | ) | [inline] |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::autoDim, lti::principalComponents< T >::parameters::centerData, lti::functor::parameters::clone(), lti::functor::parameters::copy(), lti::principalComponents< T >::parameters::eigen, lti::principalComponents< T >::parameters::relevance, lti::principalComponents< T >::parameters::resultDim, lti::principalComponents< T >::parameters::svd, lti::principalComponents< T >::parameters::useCorrelation, lti::principalComponents< T >::parameters::useSVD, and lti::principalComponents< T >::parameters::whitening.
Referenced by lti::principalComponents< T >::parameters::operator=(), and lti::principalComponents< T >::parameters::parameters().
const char* lti::principalComponents< T >::parameters::getTypeName | ( | void | ) | const [inline, virtual] |
returns name of this type
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
parameters& lti::principalComponents< T >::parameters::operator= | ( | const parameters & | other | ) | [inline] |
Assigns the contents of the other object to this object.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::copy().
virtual bool lti::principalComponents< T >::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [inline, virtual] |
read the parameters from the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also read, otherwise only the data block will be read. |
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::autoDim, lti::principalComponents< T >::parameters::centerData, lti::ioHandler::readBegin(), lti::ioHandler::readEnd(), lti::principalComponents< T >::parameters::relevance, lti::principalComponents< T >::parameters::resultDim, lti::principalComponents< T >::parameters::useCorrelation, and lti::principalComponents< T >::parameters::whitening.
virtual bool lti::principalComponents< T >::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [inline, virtual] |
write the parameters in the given ioHandler
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from lti::linearAlgebraFunctor::parameters.
Reimplemented in lti::regularizedPCA< T >::parameters.
References lti::principalComponents< T >::parameters::autoDim, lti::principalComponents< T >::parameters::centerData, lti::principalComponents< T >::parameters::relevance, lti::principalComponents< T >::parameters::resultDim, lti::principalComponents< T >::parameters::useCorrelation, lti::principalComponents< T >::parameters::whitening, lti::ioHandler::writeBegin(), and lti::ioHandler::writeEnd().
bool lti::principalComponents< T >::parameters::autoDim |
This flag determines, if the functor should determine a maximum allowable dimension itself.
"Maximum dimension" means that the dimension is equal to the number of eigenvalues of the covariance matrix which are larger than zero.
Default value: false
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), lti::principalComponents< T >::parameters::read(), and lti::principalComponents< T >::parameters::write().
bool lti::principalComponents< T >::parameters::centerData |
This flag denotes if the transformed data should be centered around zero.
This is the usual behaviour of the PCA, but for some special operations it may be necessary to disable this. If the flag is false, the mean of the transformed data is moved to the transformed mean of the source data.
Default: true
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), lti::principalComponents< T >::parameters::read(), and lti::principalComponents< T >::parameters::write().
eigenSystem<T>* lti::principalComponents< T >::parameters::eigen |
The eigensystem functor used for computing eigenvectors.
Default with LAPACK: lti::fastEigenSystem<T> Default without LAPACK: lti::jacobi<T>
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), and lti::principalComponents< T >::parameters::~parameters().
T lti::principalComponents< T >::parameters::relevance |
The factor which determines relevant eigenvectors.
An eigenvector is considered relevant if its eigenvalue is at least as large as the largest eigenvalue divided by this number. Usually, it takes values between 1e4 and 1e6.
Default: T(100000)
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), lti::principalComponents< T >::parameters::read(), and lti::principalComponents< T >::parameters::write().
int lti::principalComponents< T >::parameters::resultDim |
This is the dimension of the reduced vectors.
Default value: 3
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), lti::principalComponents< T >::parameters::read(), and lti::principalComponents< T >::parameters::write().
singularValueDecomp<T>* lti::principalComponents< T >::parameters::svd |
Singular value decomposition to be used when useSVD is true.
Default is null. If LAPACK is used and data matrices are large consider using lti::fastSVD<T>.
Referenced by lti::principalComponents< T >::parameters::copy(), and lti::principalComponents< T >::parameters::parameters().
bool lti::principalComponents< T >::parameters::useCorrelation |
This flag determines if the functor should use the correlation coefficient matrix (flag is true) for eigenvector computation or the covariance matrix (flag is false).
The default is false.
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), lti::principalComponents< T >::parameters::read(), and lti::principalComponents< T >::parameters::write().
bool lti::principalComponents< T >::parameters::useSVD |
When true singular value decomposition instead of eigensystem solution is used to calculate the eigenvectors and eigenvalues.
This can be much faster and less memory consuming. Default is false.
Referenced by lti::principalComponents< T >::parameters::copy(), and lti::principalComponents< T >::parameters::parameters().
bool lti::principalComponents< T >::parameters::whitening |
This flag determines if the functor should perform a whitening transform of the data.
Whitening means that 1. A PCA is performed, using the covariance matrix for eigenvector computation 2. A scaling of the transformed data by the inverse of the square root of the eigenvalues.
You should set useCorrelation to false if you use whitening.
The default is false.
Referenced by lti::principalComponents< T >::parameters::copy(), lti::principalComponents< T >::parameters::parameters(), lti::principalComponents< T >::parameters::read(), and lti::principalComponents< T >::parameters::write().