GClasses

GClasses::SOM::TrainingAlgorithm Class Reference

An algorithm for training self-organizing maps. Before training is started, it is expected that the nodes are allocated and that the geometry of the map has been set by giving each node a position and a distance function. However, the weight vectors and the output dimensionality will be completely overwritten by training. More...

#include <GSelfOrganizingMap.h>

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

List of all members.

Public Member Functions

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.
virtual void train (GSelfOrganizingMap &map, GMatrix *pIn)=0
 Train the map. Subclassers see also TrainingAlgorithm::setPRelationBefore.
virtual ~TrainingAlgorithm ()
 Virtual destructor.

Static Public Member Functions

static TrainingAlgorithmdeserialize (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.

Protected Member Functions

GDistanceMetricweightDistance (GSelfOrganizingMap &map)
 Return the weight distance function so it's dimensionality can be modified by training algorithms.
void setPRelationBefore (GSelfOrganizingMap &map, sp_relation &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.

Detailed Description

An algorithm for training self-organizing maps. Before training is started, it is expected that the nodes are allocated and that the geometry of the map has been set by giving each node a position and a distance function. However, the weight vectors and the output dimensionality will be completely overwritten by training.


Constructor & Destructor Documentation

virtual GClasses::SOM::TrainingAlgorithm::~TrainingAlgorithm ( ) [inline, virtual]

Virtual destructor.


Member Function Documentation

static TrainingAlgorithm* GClasses::SOM::TrainingAlgorithm::deserialize ( GDomNode pNode) [static]

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.

virtual GDomNode* GClasses::SOM::TrainingAlgorithm::serialize ( GDom pDoc) const [virtual]

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.

void GClasses::SOM::TrainingAlgorithm::setPRelationBefore ( GSelfOrganizingMap map,
sp_relation newval 
) [inline, protected]

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.

virtual void GClasses::SOM::TrainingAlgorithm::train ( GSelfOrganizingMap map,
GMatrix pIn 
) [pure virtual]
GDistanceMetric & GClasses::SOM::TrainingAlgorithm::weightDistance ( GSelfOrganizingMap map) [inline, protected]

Return the weight distance function so it's dimensionality can be modified by training algorithms.