GClasses
GClasses::SOM::TrainingAlgorithm Class Referenceabstract

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.

#include <GSelfOrganizingMap.h>

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

Public Member Functions

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

Static Public Member Functions

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

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

virtual GClasses::SOM::TrainingAlgorithm::~TrainingAlgorithm ( )
inlinevirtual

Virtual destructor.

Member Function Documentation

static TrainingAlgorithm* GClasses::SOM::TrainingAlgorithm::deserialize ( const 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,
const GRelation newval 
)
inlineprotected

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,
const GMatrix pIn 
)
pure virtual
GDistanceMetric & GClasses::SOM::TrainingAlgorithm::weightDistance ( GSelfOrganizingMap map)
inlineprotected

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