lti::fastICA< T > Class Template Reference
This class implements a fast fixed point algorithm for the Independent Component Analysis (ICA).
More...
#include <ltiFastICA.h>
List of all members.
Classes |
class | parameters |
| The parameters for the class fastICA. More...
|
Public Member Functions |
| fastICA () |
| fastICA (const parameters &par) |
| fastICA (const fastICA &other) |
virtual | ~fastICA () |
virtual const char * | getTypeName () const |
virtual bool | apply (matrix< T > &srcdest) |
virtual bool | apply (const matrix< T > &src, matrix< T > &dest) |
bool | computeTransformMatrix (const matrix< T > &src) |
const matrix< T > & | getRotationMatrix () const |
bool | getRotationMatrix (matrix< T > &dest) const |
const matrix< T > & | getWhiteningMatrix () const |
bool | getWhiteningMatrix (matrix< T > &dest) const |
const matrix< T > & | getTransformMatrix () const |
bool | getTransformMatrix (matrix< T > &dest) const |
bool | getOffsetVector (vector< T > &result) const |
const vector< T > & | getOffsetVector () const |
bool | transform (const matrix< T > &src, matrix< T > &dest) const |
bool | transform (matrix< T > &srcdest) const |
bool | transform (const vector< T > &src, vector< T > &dest) const |
bool | transform (vector< T > &srcdest) const |
fastICA & | copy (const fastICA &other) |
fastICA & | operator= (const fastICA &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
virtual bool | updateParameters () |
Protected Member Functions |
bool | centerData (matrix< T > &srcdest) const |
bool | icaDeflationary (const matrix< T > &src, matrix< T > &dest, const parameters &par) const |
bool | icaSymmetric (const matrix< T > &src, matrix< T > &dest, const parameters &par) const |
bool | closeEnough (const vector< T > &a, const vector< T > &b, const T epsilon) const |
bool | closeEnough (const matrix< T > &a, const matrix< T > &b, const T epsilon) const |
T | expo1 (const T x) const |
T | expo2 (const T x) const |
T | tanh1 (const T x) const |
T | tanh2 (const T x) const |
T | kurt1 (const T x) const |
T | kurt2 (const T x) const |
Protected Attributes |
principalComponents< T > | pca |
T(fastICA< T >::* | g )(const T x) const |
T(fastICA< T >::* | gd )(const T x) const |
T | a1 |
uniformDistribution | uniDist |
matrix< T > | transformMatrix |
matrix< T > | whiteningMatrix |
matrix< T > | rotationMatrix |
Detailed Description
template<class T>
class lti::fastICA< T >
This class implements a fast fixed point algorithm for the Independent Component Analysis (ICA).
It receives a set of input vectors in form of a matrix (each row of the matrix corresponds to an input vector), which will be transformed with ICA. (apply() methods)
If you only want to compute the transformation matrix you can use the computeTransformMatrix() methods.
Once the transformationMatrix is computed (by an apply, or computeTransformMatrix method) you can use the transform() methods to transform other datasets with the same transformation matrix.
Note that you have to subtract the offset vector from data you want to transform with the transformation matrix if not using the transform() methods.
Constructor & Destructor Documentation
Copy constructor.
- Parameters:
-
Member Function Documentation
This computes a transformation matrix and transforms the given data.
- Parameters:
-
| src | matrix with the source data. Each row represents a dataset. |
| dest | matrix where the result will be left. |
- Returns:
- true if apply successful or false otherwise.
operates on the given parameter.
- Parameters:
-
| srcdest | matrix with the source data. The result will be left here too. |
- Returns:
- true if apply successful or false otherwise.
method to center the data
method to determine if a vector is close enough to another
method to determine if a vector is close enough to another
only computes the transformation matrix.
- Parameters:
-
| src | matrix with the sourc data. Each row represents a dataset |
- Returns:
- true if apply successful or false otherwise.
First derivation of Exp negentropyApproximation.
Second derivation of Exp negentropyApproximation.
Returns the previously computed offset vector, which corresponds to the mean of the data.
- Returns:
- a const reference to the last computed or used offset vector.
Returns the previously computed offset vector, which corresponds to the mean of the data.
- Parameters:
-
| result | the offset vector will be written here. |
- Returns:
- true if the matrix could be computed, false otherwise.
Returns the saved rotation matrix, which was computed with ICA.
- Parameters:
-
Returns the saved transformation matrix.
- Parameters:
-
| dest | last computed or used transformation matrix will be stored here. |
Returns the saved transformation matrix.
This is only the product of (whitening matrix) * (rotation matrix).
Note: If you want to use the transformation matrix to transform datasets, you should subtract the offset vector from your data first.
- Returns:
- a const reference to the last computed or used transform matrix.
template<class T>
virtual const char* lti::fastICA< T >::getTypeName |
( |
|
) |
const [virtual] |
Returns the saved whitening matrix, which was computed with ICA.
- Parameters:
-
| dest | last computed or used whitening matrix will be stored here. |
Returns the saved whitening matrix, which was computed with PCA.
- Returns:
- a const reference to the last computed or used whitening matrix.
ICA with deflationary approach.
ICA with symmetric approach.
First derivation of Pow4 negentropyApproximation (Kurtosis).
Second derivation of Pow4 negentropyApproximation (Kurtosis).
First derivation of Tanh negentropyApproximation.
Second derivation of Tanh negentropyApproximation.
Transforms a single vector according to a previously computed transformation matrix.
- Parameters:
-
| srcdest | the input data, the result will be left here too |
- Returns:
- true if operation was succesfull and false otherwise
Transforms a single vector according to a previously computed transformation matrix.
- Parameters:
-
| src | the data vector |
| dest | the transformed vector will be left here |
Transform an entire matrix according to a previosly computed transformation matrix.
- Parameters:
-
| srcdest | the input data, the result will be left here, too |
- Returns:
- true if operation was succesfull and false otherwise
Transform an entire matrix according to a previosly computed transformation matrix.
- Parameters:
-
| src | the input data |
| dest | here the transformed data will be left |
- Returns:
- true if operation was succesfull and false otherwise
template<class T>
virtual bool lti::fastICA< T >::updateParameters |
( |
|
) |
[virtual] |
Update functor's parameters.
This member updates the internal state of the functor according to the parameter set.
- Returns:
- true if successful, false otherwise
Reimplemented from lti::functor.
Member Data Documentation
Constants for tuning negentropyApproximation functions are copied from parameters in setParameters to this variable.
Function pointer to the non-linearity function which should be used.
This pointer is set in updateParameters dependent on the negentropyAproximation setting.
Default: negentropyApproximation
Function pointer to derivation of above g.
PCA functor which is applied before ICA with Whitening.
Matrix which is used to save the whitening matrix.
Used to choose initial random vectors.
Matrix which is used to save the whitening matrix.
The documentation for this class was generated from the following file: