GClasses
GClasses::SOM::BatchTraining Class Reference

Detailed Description

Implements the batch training algorithm for self-organizing maps as described in T. Kohonen "Self Organizing Maps" Third Edition, 2001, published by Springer.

#include <GSelfOrganizingMap.h>

Inheritance diagram for GClasses::SOM::BatchTraining:
GClasses::SOM::TrainingAlgorithm

Public Member Functions

 BatchTraining (double initialNeighborhoodSize, double finalNeighborhoodSize, unsigned numIterations, unsigned maxSubIterationsBeforeChangingNeighborhood, NodeWeightInitialization *weightInitialization, NeighborhoodWindowFunction *windowFunc, Reporter *reporter)
 Create a batch algorithm that starts its neighborhood width at initialNeighborhoodSize and decreases it exponentially to finalNeighborhoodSize over numIterations steps. In each iteration, at most maxSubIterationsBeforeChangingNeighborhood (which must be at least 1) passes of the algorithm will be done with a fixed neighborhood before the next iteration with a different neighborhood size is started. If convergence occurs, less sub-iterations will be used. weightInitialization is the initialization function that will be used to initialize the node weights at the start of training. windowFunc is the window function used to determine the influence of neighbors on one another. reporter is the Reporter object that will be called to report progress during training. More...
 
virtual ~BatchTraining ()
 
virtual void train (GClasses::GSelfOrganizingMap &map, const GClasses::GMatrix *pIn)
 Train the map. More...
 
- Public Member Functions inherited from GClasses::SOM::TrainingAlgorithm
virtual ~TrainingAlgorithm ()
 Virtual destructor. More...
 
virtual GDomNodeserialize (GDom *pDoc) const
 Add this training algorithm to pDoc and return the resulting node Right now, default implementation is the only one there and it just adds an object with no fields. TODO: make serialize a pure virtual method and implement it in all the training algorithm subclasses. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from GClasses::SOM::TrainingAlgorithm
static TrainingAlgorithmdeserialize (const GDomNode *pNode)
 Create the correct type of training algorithm from the given dom node. Right now just returns a pointer to a DummyTrainingAlgorithm TODO: fix deserialize so training algorithms are really serialized. More...
 
- Protected Member Functions inherited from GClasses::SOM::TrainingAlgorithm
void setPRelationBefore (GSelfOrganizingMap &map, const GRelation &newval)
 Set map.m_pRelationBefore to newval. All subclasses must call this in their train methods so that the map will appear trained for the purposes of GIncrementalTransform. More...
 
GDistanceMetricweightDistance (GSelfOrganizingMap &map)
 Return the weight distance function so it's dimensionality can be modified by training algorithms. More...
 

Constructor & Destructor Documentation

GClasses::SOM::BatchTraining::BatchTraining ( double  initialNeighborhoodSize,
double  finalNeighborhoodSize,
unsigned  numIterations,
unsigned  maxSubIterationsBeforeChangingNeighborhood,
NodeWeightInitialization weightInitialization,
NeighborhoodWindowFunction windowFunc,
Reporter reporter 
)

Create a batch algorithm that starts its neighborhood width at initialNeighborhoodSize and decreases it exponentially to finalNeighborhoodSize over numIterations steps. In each iteration, at most maxSubIterationsBeforeChangingNeighborhood (which must be at least 1) passes of the algorithm will be done with a fixed neighborhood before the next iteration with a different neighborhood size is started. If convergence occurs, less sub-iterations will be used. weightInitialization is the initialization function that will be used to initialize the node weights at the start of training. windowFunc is the window function used to determine the influence of neighbors on one another. reporter is the Reporter object that will be called to report progress during training.

The training object owns weightInialization, windowFunc, and reporter and so is responsible for deleting them.

virtual GClasses::SOM::BatchTraining::~BatchTraining ( )
virtual

Member Function Documentation

virtual void GClasses::SOM::BatchTraining::train ( GClasses::GSelfOrganizingMap map,
const GClasses::GMatrix pIn 
)
virtual

Train the map.

Implements GClasses::SOM::TrainingAlgorithm.