latest version v1.9 - last update 10 Apr 2010 |
Performs Sammon's Mapping. More...
#include <ltiSammonsMapping.h>
Classes | |
class | parameters |
the parameters for the class sammonsMapping More... | |
Public Member Functions | |
sammonsMapping () | |
sammonsMapping (const sammonsMapping &other) | |
virtual | ~sammonsMapping () |
virtual const char * | getTypeName () const |
bool | apply (const dmatrix &src, dmatrix &dest, double &error) const |
bool | apply (const dmatrix &src, dmatrix &dest) const |
sammonsMapping & | copy (const sammonsMapping &other) |
sammonsMapping & | operator= (const sammonsMapping &other) |
virtual functor * | clone () const |
const parameters & | getParameters () const |
void | setProgressObject (const progressInfo &progBox) |
void | removeProgressObject () |
bool | validProgressObject () const |
progressInfo & | getProgressObject () |
const progressInfo & | getProgressObject () const |
Protected Member Functions | |
void | initRandom (dmatrix &dest) const |
void | initPca (const dmatrix &data, dmatrix &dest) const |
Protected Attributes | |
progressInfo * | progressBox |
Performs Sammon's Mapping.
The data from some high dimensional source space is mapped to a destination space of lower dimensionality. In the process Sammon's Mapping tries to keep distances between samples in the destination space as close to those in the source space. Typical uses are data analysis or visualization of SOFM networks. For details see:
John W. Sammon, Jr. A nonlinear mapping for data structure analysis. IEEE Transactions on Computers, C-18(5):401-409, May 1969.
There are several parameters the algorithm can be tuned with. Initialization is usually performed using principal component analysis. It projects the data from the original space into the destination space using the eigenvectors with largest eingenvalues. The other option --- random initialization --- seems to be useful for demonstration purposes, only.
Three methods are available for minimizing the error or stress of the mapping: gradient descent, gradient descent with momentum and steepest descent. Of these, steepest descent usually requires the smallest number of iterations, but each iteration is more costly. Further, with many planes in the error surface, the computation of the second derivative might not be possible. In case of 0 this value is set to 1.E-4 as a work-around. The gradient descent methods are much more stable. Their convergence, however, is much slower. Using momentum can lead to faster convergence than regular gradient descent but also needs more computation per iteration. According to Sammon, errors should be below 1E-2 to be considered good. Usually, much smaller errors are achieved.
lti::sammonsMapping::sammonsMapping | ( | ) |
default constructor
lti::sammonsMapping::sammonsMapping | ( | const sammonsMapping & | other | ) |
copy constructor
other | the object to be copied |
virtual lti::sammonsMapping::~sammonsMapping | ( | ) | [virtual] |
destructor
operates on a copy of the given parameters.
src | dmatrix with the source data. | |
dest | dmatrix where the result will be left. |
operates on a copy of the given parameters.
src | dmatrix with the source data. | |
dest | dmatrix where the result will be left. | |
error | the error of the mapping |
Referenced by lti::SOFM2DVisualizer::sammonsMapper().
virtual functor* lti::sammonsMapping::clone | ( | ) | const [virtual] |
returns a pointer to a clone of this functor.
Implements lti::functor.
sammonsMapping& lti::sammonsMapping::copy | ( | const sammonsMapping & | other | ) |
copy data of "other" functor.
other | the functor to be copied |
Reimplemented from lti::functor.
const parameters& lti::sammonsMapping::getParameters | ( | ) | const |
returns used parameters
Reimplemented from lti::functor.
const progressInfo& lti::sammonsMapping::getProgressObject | ( | ) | const |
get progress object
progressInfo& lti::sammonsMapping::getProgressObject | ( | ) |
get progress object
virtual const char* lti::sammonsMapping::getTypeName | ( | ) | const [virtual] |
returns the name of this type ("sammonsMapping")
Reimplemented from lti::functor.
Initialization using PCA.
void lti::sammonsMapping::initRandom | ( | dmatrix & | dest | ) | const [protected] |
Random initialization.
sammonsMapping& lti::sammonsMapping::operator= | ( | const sammonsMapping & | other | ) |
void lti::sammonsMapping::removeProgressObject | ( | ) |
remove the active progress object
void lti::sammonsMapping::setProgressObject | ( | const progressInfo & | progBox | ) |
set a progress object
A clone of the given object will be generated.
bool lti::sammonsMapping::validProgressObject | ( | ) | const |
return true if a valid progressInfo object has already been setted
progressInfo* lti::sammonsMapping::progressBox [mutable, protected] |
current progress object