GClasses
GClasses::SOM::TraditionalTraining Class Reference

Detailed Description

Implments the traditional step-wise training of self-organized maps //TODO: finish this comment.

#include <GSelfOrganizingMap.h>

Inheritance diagram for GClasses::SOM::TraditionalTraining:
GClasses::SOM::TrainingAlgorithm

Public Member Functions

 TraditionalTraining (double initialWidth, double finalWidth, double initialRate, double finalRate, unsigned numIterations, NodeWeightInitialization *weightInitialization, NeighborhoodWindowFunction *windowFunc, Reporter *reporter)
 Create a traditional SOM training algorithm that starts its learning rate and neighborhood width at initialWidth and initialRate then decreases them exponentially so that they both reach finalWidth and finalRate after numIterations iterations. Each iteration consists of one presentation of an input datum to the network and one weight update of the neighbors of the winning neuron at the current learning rate. More...
 
virtual ~TraditionalTraining ()
 
GRandrand ()
 Return a reference to the pseudo-random number generator used by this object. More...
 
virtual void train (GSelfOrganizingMap &map, const 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::TraditionalTraining::TraditionalTraining ( double  initialWidth,
double  finalWidth,
double  initialRate,
double  finalRate,
unsigned  numIterations,
NodeWeightInitialization weightInitialization,
NeighborhoodWindowFunction windowFunc,
Reporter reporter 
)

Create a traditional SOM training algorithm that starts its learning rate and neighborhood width at initialWidth and initialRate then decreases them exponentially so that they both reach finalWidth and finalRate after numIterations iterations. Each iteration consists of one presentation of an input datum to the network and one weight update of the neighbors of the winning neuron at the current learning rate.

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::TraditionalTraining::~TraditionalTraining ( )
virtual

Member Function Documentation

GRand& GClasses::SOM::TraditionalTraining::rand ( )
inline

Return a reference to the pseudo-random number generator used by this object.

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

Train the map.

Implements GClasses::SOM::TrainingAlgorithm.