Image Component Library (ICL)
Public Member Functions | List of all members
icl::math::SOM2D Class Reference

Simple Wrapper class of the generic SOM Implementation for 2D SOMs. More...

#include <SOM2D.h>

Inheritance diagram for icl::math::SOM2D:
icl::math::SOM

Public Member Functions

 SOM2D (unsigned int dataDim, unsigned int nXCells, unsigned int nYCells, const std::vector< utils::Range< float > > &prototypeBounds, float epsilon=0.1, float sigma=1)
 Wrapper constructor for 2D SOMs. More...
 
const NeurongetNeuron (int x, int y) const
 Wrapper function to access a neuron at a certain grid position. More...
 
- Public Member Functions inherited from icl::math::SOM
 SOM (unsigned int dataDim, const std::vector< unsigned int > &dims, const std::vector< utils::Range< float > > &prototypeBounds, float epsilon=0.1, float sigma=1)
 create a new SOM with given data dimension and grid dimensions. More...
 
 ~SOM ()
 Destructor. More...
 
void train (const float *input)
 trains the net using given input vector and current parameters epsilon and sigma More...
 
const NeurongetWinner (const float *input) const
 returns a reference of the winner neuron dependent on a given input vector (const) More...
 
NeurongetWinner (const float *input)
 returns a reference of the winner neuron dependent on a given input vector More...
 
const std::vector< Neuron > & getNeurons () const
 returns the neuron set (const) More...
 
std::vector< Neuron > & getNeurons ()
 returns the neuron set More...
 
const NeurongetNeuron (const std::vector< int > &dims) const
 returns a neuron at given grid location (const) More...
 
NeurongetNeuron (const std::vector< int > &dims)
 returns a neuron at given grid location More...
 
unsigned int getDataDim () const
 returns the data dimension More...
 
unsigned int getSomDim () const
 returns the SOM dimension (e.g. 2D, 3D ..) More...
 
const std::vector< unsigned int > getDimensions () const
 returns the SOM's grid dimension (e.g. 20x40 for a 2D SOM) More...
 
void setEpsilon (float epsilon)
 sets the current learning rate epsilon More...
 
void setSigma (float sigma)
 sets the current grid distance function standard deviation More...
 

Additional Inherited Members

- Protected Attributes inherited from icl::math::SOM
unsigned int m_uiDataDim
 internal data dimension variable More...
 
unsigned int m_uiSomDim
 internal SOM dimension variable ( = m_vecPrototypeBounds.size() = m_vecDimensions.size() ) More...
 
std::vector< unsigned int > m_vecDimensions
 internal grid dimensions More...
 
std::vector< utils::Range< float > > m_vecPrototypeBounds
 internal bounds for prototype ranges (todo: is it necessary to store them ?) More...
 
std::vector< Neuronm_vecNeurons
 set of neurons More...
 
std::vector< unsigned int > m_vecDimOffsets
 internal utility offset vector for each dimension More...
 
float m_fEpsilon
 learning rate More...
 
float m_fSigma
 standard deviation for the grid distance function More...
 

Detailed Description

Simple Wrapper class of the generic SOM Implementation for 2D SOMs.

As the SOM class provides a very abstract interface for generic K-D Self Organizing Maps, the SOM2D class offers a more convenient interface for exactly 2D SOMs.
Therefore it has a specialized constructor (now receiving the count of x-Cells and y-Cells directly as well as a specialized getNeuron()- function.

Constructor & Destructor Documentation

◆ SOM2D()

icl::math::SOM2D::SOM2D ( unsigned int  dataDim,
unsigned int  nXCells,
unsigned int  nYCells,
const std::vector< utils::Range< float > > &  prototypeBounds,
float  epsilon = 0.1,
float  sigma = 1 
)
inline

Wrapper constructor for 2D SOMs.

Parameters
dataDimdimension of data elements and therewith dimension of prototype vectors
nXCellscell count of the SOM in x-direction
nYCellscell count of the SOM in y-direction
prototypeBounds
See also
SOM
Parameters
epsilon
See also
SOM
Parameters
sigma
See also
SOM

Member Function Documentation

◆ getNeuron()

const Neuron& icl::math::SOM2D::getNeuron ( int  x,
int  y 
) const
inline

Wrapper function to access a neuron at a certain grid position.

Parameters
xx-grid locatio of the neuron
yy-grid locatio of the neuron

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