Kohonen's Self Organizing Map
Float Neighboring Neuron
Constructors
FloatMappingNeuron(_prevs, _num_prev, _query_manager)
-
_prevs(FloatUnitNeuron**)-
Array of memory addresses pointing to
FloatUnitNeuronand its subclass instances-
Indicates
previousneurons that the current neuron derivesstatedata from-
If the assigned array consists of pointers to subclasses of
FloatUnitNeuron, include(FloatUnitNeuron**)in front of the variable -
_num_prevs-
Number of elements (
int) in the_prevsarray -
_query_manager(FeedbackQueryManager*)-
Reference to the
FeedbackQueryManagerinstance
FloatMappingNeuron(_prevs, _num_prev, _query_manager, _max)
-
_prevs(FloatUnitNeuron**)-
Array of memory addresses pointing to
FloatUnitNeuronand its subclass instances-
Indicates
previousneurons that the current neuron derivesstatedata from-
If the assigned array consists of pointers to subclasses of
FloatUnitNeuron, include(FloatUnitNeuron**)in front of the variable -
_num_prevs-
Number of elements (
int) in the_prevsarray -
_query_manager-
Reference to the
FeedbackQueryManagerinstance -
_max-
Largest amount of the initial weight values for each neuron
Structure
Public Methods and Variables
lr(floating point value)- Learning rate for weight update
- The default value is set to
0.7fvoid assign_neighbors(FloatMappingNeuron** _neighbors, int _num_neighbors)- Assign neighboring neurons in the self organizing map
- Array of pointers to
FloatMappingNeuron
_neighbors- Number of elements in
_neighbors
_num_neighbors- Array of pointers to
void feedforward()-
Calculate distance between weights stored in neuron and the
values of input neurons
void feedback(float* fb_input)-
Update weights based on values of the input neurons and the
distance calculated in
feedforward()fb_inputis a 2-D array that consists of{CURRENT_NUMBER_OF_NEIGHBORS, NUMBER_OF_NEIGHBORS_TO_UPDATE}float* see_memory()-
Output current weight values of the neuron
Additional Notes and Code
For more details on private variables, methods, and other functionalities performed within the definition of the class, refer to the hpp file and the cpp file .
Kohonen's SOM Operator
Subclass of GlobalOperator that starts the
Kohonen's self organizing map
training process of the neural network
Constructors
FloatKohonenSOM(_maps, int _num_maps, int _neighbor_range)
_maps(FloatMappingNeuron**)-
Array of memory addresses to
FloatMappingNeuronused as the output neurons_num_maps-
Number of elements (
int) in_maps_neighbor_range-
Number of neighboring neurons to update starting with the winning neuron
Code
For more details on private variables, methods, and other functionalities performed within the definition of the class, refer to the hpp file and the cpp file .