LTI-Lib latest version v1.9 - last update 10 Apr 2010

lti::SOFM2D Class Reference

This is a Self-Organizing Feature Map with a 2-D grid of neurons. More...

#include <ltiSOFM2D.h>

Inheritance diagram for lti::SOFM2D:
Inheritance graph
[legend]
Collaboration diagram for lti::SOFM2D:
Collaboration graph
[legend]

List of all members.

Classes

class  parameters
 the parameters for the class SOFM2D More...

Public Member Functions

 SOFM2D ()
 SOFM2D (const SOFM2D &other)
virtual ~SOFM2D ()
virtual const char * getTypeName () const
SOFM2Dcopy (const SOFM2D &other)
SOFM2Doperator= (const SOFM2D &other)
virtual classifierclone () const
const parametersgetParameters () const
virtual bool train (const dmatrix &input, ivector &ids)
virtual bool train (const dmatrix &input)
virtual bool classify (const dvector &feature, outputVector &result) const
point size () const
int xSize () const
int ySize () const
virtual bool write (ioHandler &handler, const bool complete=true) const
virtual bool read (ioHandler &handler, const bool complete=true)

Protected Member Functions

bool calcSize (const dmatrix &data)
bool initGrid (const dmatrix &data)
void getNeighborhoodKernel (const int &maxN, kernel2D< double > &facN)
bool trainDist (const dmatrix &data)
bool trainDot (const dmatrix &data)

Protected Attributes

int sizeX
int sizeY
double eva1
double eva2
dvector eve1
dvector eve2

Detailed Description

This is a Self-Organizing Feature Map with a 2-D grid of neurons.


Constructor & Destructor Documentation

lti::SOFM2D::SOFM2D (  ) 

default constructor

lti::SOFM2D::SOFM2D ( const SOFM2D other  ) 

copy constructor

Parameters:
other the object to be copied
virtual lti::SOFM2D::~SOFM2D (  )  [virtual]

destructor


Member Function Documentation

bool lti::SOFM2D::calcSize ( const dmatrix data  )  [protected]

calculate sizeX and sizeY in case of param.calulateSize is true

virtual bool lti::SOFM2D::classify ( const dvector feature,
outputVector result 
) const [virtual]

Classification.

Classifies the feature and returns the outputVector with the classification result.

Parameters:
feature the vector to be classified
result the result of the classification
Returns:
false if an error occurred during classification else true

Implements lti::SOFM.

Referenced by lti::SOFM2DVisualizer::drawClasses(), and lti::SOFM2DVisualizer::drawHits().

virtual classifier* lti::SOFM2D::clone (  )  const [virtual]

returns a pointer to a clone of this classifier.

Implements lti::SOFM.

SOFM2D& lti::SOFM2D::copy ( const SOFM2D other  ) 

copy data of "other" classifier.

Parameters:
other the classifier to be copied
Returns:
a reference to this classifier object

Reimplemented from lti::SOFM.

void lti::SOFM2D::getNeighborhoodKernel ( const int &  maxN,
kernel2D< double > &  facN 
) [protected]

calculate the neigborhood kernel

const parameters& lti::SOFM2D::getParameters (  )  const

returns used parameters

Reimplemented from lti::SOFM.

virtual const char* lti::SOFM2D::getTypeName (  )  const [virtual]

returns the name of this type ("SOFM2D")

Reimplemented from lti::SOFM.

bool lti::SOFM2D::initGrid ( const dmatrix data  )  [protected]

initializes the grid according to parameters.initType

SOFM2D& lti::SOFM2D::operator= ( const SOFM2D other  ) 

alias for copy member

Parameters:
other the classifier to be copied
Returns:
a reference to this classifier object

Reimplemented from lti::SOFM.

virtual bool lti::SOFM2D::read ( ioHandler handler,
const bool  complete = true 
) [virtual]

read the SOFM2D from the given ioHandler

Parameters:
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.
Returns:
true if write was successful

Reimplemented from lti::SOFM.

point lti::SOFM2D::size (  )  const [inline]

returns the size (x,y) of the feature map.

References sizeX, and sizeY.

virtual bool lti::SOFM2D::train ( const dmatrix input  )  [virtual]

Unsupervised training.

The row vectors in the input matrix are used for training of the classifier.

Parameters:
input the matrix with the input vectors (each row is a training vector)
Returns:
true if successful, false otherwise. (if false you can check the error message with getStatusString())

Implements lti::SOFM.

virtual bool lti::SOFM2D::train ( const dmatrix input,
ivector ids 
) [virtual]

Unsupervised training.

The vectors in the input matrix will be put into groups according to the training algorithm. Additionally, an integer indicating the class each point belongs to is returned.

By default this method uses the other train method train(const dmatrix&) and then calls classify(const dvector&) to get the ids for each trainvector. These ids are then returned.

Parameters:
input the matrix with the input vectors (each row is a training vector)
ids vector of class ids for each input point
Returns:
true if successful, false otherwise. (if false you can check the error message with getStatusString())

Reimplemented from lti::SOFM.

bool lti::SOFM2D::trainDist ( const dmatrix data  )  [protected]

train the SOFM using L1- or L2-Norm

bool lti::SOFM2D::trainDot ( const dmatrix data  )  [protected]

train the SOFM using dot product

virtual bool lti::SOFM2D::write ( ioHandler handler,
const bool  complete = true 
) const [virtual]

write the SOFM2D in the given ioHandler

Parameters:
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.
Returns:
true if write was successful

Reimplemented from lti::SOFM.

int lti::SOFM2D::xSize (  )  const [inline]
int lti::SOFM2D::ySize (  )  const [inline]

Member Data Documentation

double lti::SOFM2D::eva1 [protected]

the highest eigenvalue of the train data

double lti::SOFM2D::eva2 [protected]

the second highest eigenvalue of the train data

the the eigenvector corresponding to eva1

the the eigenvector corresponding to eva2

int lti::SOFM2D::sizeX [protected]

size of the first dimension

Referenced by size(), and xSize().

int lti::SOFM2D::sizeY [protected]

size of the second dimension

Referenced by size(), and ySize().


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

Generated on Sat Apr 10 15:26:59 2010 for LTI-Lib by Doxygen 1.6.1