86 Neuron(vector_type gridpos,vector_type prototype,
unsigned int griddim,
unsigned int datadim);
104 inline bool isNull()
const {
return !!gridpos; }
119 SOM(
unsigned int dataDim,
const std::vector<unsigned int> &dims,
121 float epsilon=0.1,
float sigma=1);
127 void train(
const float *input);
130 const Neuron &getWinner(
const float *input)
const;
133 Neuron &getWinner(
const float *input);
136 const std::vector<Neuron> &getNeurons()
const;
139 std::vector<Neuron> &getNeurons();
142 const Neuron &getNeuron(
const std::vector<int> &dims)
const;
145 Neuron &getNeuron(
const std::vector<int> &dims);
154 const std::vector<unsigned int>
getDimensions()
const {
return m_vecDimensions; }
157 void setEpsilon(
float epsilon);
160 void setSigma(
float sigma);
float m_fEpsilon
learning rate
Definition: SOM.h:183
undocument this line if you encounter any issues!
Definition: Any.h:37
#define ICLMath_API
Definition: CompatMacros.h:173
unsigned int getSomDim() const
returns the SOM dimension (e.g. 2D, 3D ..)
Definition: SOM.h:151
std::vector< unsigned int > m_vecDimensions
internal grid dimensions
Definition: SOM.h:171
unsigned int m_uiSomDim
internal SOM dimension variable ( = m_vecPrototypeBounds.size() = m_vecDimensions....
Definition: SOM.h:168
unsigned int griddim
grid dimension
Definition: SOM.h:95
std::vector< Neuron > m_vecNeurons
set of neurons
Definition: SOM.h:177
unsigned int getDataDim() const
returns the data dimension
Definition: SOM.h:148
Generic implementation of D to K dim Self Organizing Map (SOM)
Definition: SOM.h:70
vector_type prototype
prototype vector of dim "datadim"
Definition: SOM.h:92
std::vector< utils::Range< float > > m_vecPrototypeBounds
internal bounds for prototype ranges (todo: is it necessary to store them ?)
Definition: SOM.h:174
float m_fSigma
standard deviation for the grid distance function
Definition: SOM.h:186
vector_type gridpos
grid position vector of dim "griddim"
Definition: SOM.h:89
Neuron()
create a null neuron
Definition: SOM.h:80
void * meta
meta-data storage pointer
Definition: SOM.h:101
std::vector< unsigned int > m_vecDimOffsets
internal utility offset vector for each dimension
Definition: SOM.h:180
utils::SmartPtr< float > vector_type
Definition: SOM.h:77
unsigned int m_uiDataDim
internal data dimension variable
Definition: SOM.h:165
const std::vector< unsigned int > getDimensions() const
returns the SOM's grid dimension (e.g. 20x40 for a 2D SOM)
Definition: SOM.h:154
unsigned int datadim
prototype dimension
Definition: SOM.h:98
bool isNull() const
returns whether this neuron is already initialized (i.e. has valid pointers)
Definition: SOM.h:104
SOM internal Neuron struct.
Definition: SOM.h:76