GClasses
|
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>
Public Member Functions | |
virtual | ~TrainingAlgorithm () |
Virtual destructor. More... | |
virtual GDomNode * | serialize (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 TrainingAlgorithm * | deserialize (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... | |
GDistanceMetric & | weightDistance (GSelfOrganizingMap &map) |
Return the weight distance function so it's dimensionality can be modified by training algorithms. More... | |
|
inlinevirtual |
Virtual destructor.
|
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.
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.
|
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.
|
pure virtual |
Train the map. Subclassers see also TrainingAlgorithm::setPRelationBefore.
Implemented in GClasses::SOM::TraditionalTraining, GClasses::SOM::BatchTraining, and GClasses::SOM::DummyTrainingAlgorithm.
|
inlineprotected |
Return the weight distance function so it's dimensionality can be modified by training algorithms.