#include <GNGAlgorithm.hpp>
Inheritance diagram for GNGAlgorithm:
Public Member Functions | |
GNGAlgorithm (unsigned int MSEBackLog) | |
Constructs a GNG Algorithm object. | |
virtual | ~GNGAlgorithm () |
virtual void | Initialize (unsigned int dim, IInputGenerator *g=0) |
Initializes the GNG Alg. | |
virtual void | SetMSEOutputStream (std::ostream *f) |
Sets the output stream used to output the mean squared error. | |
virtual void | UpdateMSE (double minDistance) |
Updates the current approximation of the mse, called once each iteration by iterate. | |
virtual void | Iterate (Vector const &input) |
Iterates through the algorithm one time. | |
void | SetComponentGNGContainer (IGNGContainer *i) |
Registers an IGNGContainer with the GNGAlgorithm object. | |
void | SetComponentNodeInserter (IGNGNodeInserter *i) |
Registers an IGNGNodeInserter with the GNGAlgorithm object. | |
void | SetComponentWinnerMovement (IGNGNodeMovement *i) |
Registers an IGNGNodeMovement with the GNGAlgorithm object. | |
void | SetComponentNeighborMovement (IGNGNodeMovement *i) |
Registers an IGNGNodeMovement with the GNGAlgorithm object. | |
void | SetParamAgeMax (double d) |
Sets the AgeMax parameter of the GNGAlgorithm. | |
void | SetParamMoveWinner (double d) |
Sets the MoveWinner parameter of the GNGAlgorithm. | |
void | SetParamMoveNeighbor (double d) |
Sets the MoveNeighbor parameter of the GNGAlgorithm. | |
void | SetParamErrorDecay (double d) |
Sets the ErrorDecay parameter of the GNGAlgorithm. | |
Protected Member Functions | |
virtual void | GetClosestNodes (GNGNode *&s, GNGNode *&t) |
Finds the two nodes closest to the current input Vector. | |
virtual void | UpdateError (GNGNode &s) |
Updates the local error of a node. | |
virtual void | IncreaseEdgeAges (GNGNode &s) |
Increases the age of all edges emenating from the node s. | |
virtual void | MoveWinner (GNGNode &s) |
Moves the winner node s towards the current input vector by a factor of paramMoveWinner. | |
virtual void | MoveNeighbor (GNGNode &s) |
Moves a neighbor node s towards the input vector by a factor of paramMoveNeighbor. | |
virtual void | MoveNeighbors (GNGNode const &s) |
Moves the neighbors of the node s towards the input vector. | |
virtual void | PurgeEdges () |
Removes edges that are too old. | |
virtual void | PurgeNodes () |
Removes nodes that have no edges. | |
virtual void | DecreaseNodeErrors () |
Decreases the local error of all nodes. | |
Protected Attributes | |
IGNGNodeInserter * | m_nodeInserter |
IGNGStopCriteria * | m_stopCritera |
IGNGNodeMovement * | m_winnerMovement |
IGNGNodeMovement * | m_neighborMovement |
IGNGContainer * | m_gngContainer |
bool | m_initDone |
unsigned int | m_dimension |
Vector | m_input |
dimension of nodes reference Vectors | |
std::ostream * | m_mseStream |
unsigned int | m_MSEBackLog |
double | m_mse |
double | m_paramAgeIncrement |
double | m_paramAgeMax |
double | m_paramMoveWinner |
double | m_paramMoveNeighbor |
double | m_paramErrorDecay |
Keeps a list of all edges. Creates and destroys edges and nodes through IGNGContainer. Updates local accumulated errors and decides where to insert new nodes using IGNGNodeInserter. It uses IGNGStopCriteria to decide when to stop.
|
Constructs a GNG Algorithm object.
|
|
|
|
Initializes the GNG Alg.
|
|
Sets the output stream used to output the mean squared error. If the mse output stream isn't set, it will not be calculated.
|
|
Updates the current approximation of the mse, called once each iteration by iterate.
|
|
Iterates through the algorithm one time.
Reimplemented in GNGUAlgorithm. |
|
Registers an IGNGContainer with the GNGAlgorithm object.
|
|
Registers an IGNGNodeInserter with the GNGAlgorithm object.
|
|
Registers an IGNGNodeMovement with the GNGAlgorithm object. This NodeMovement implementation determines how the winner node is moved.
|
|
Registers an IGNGNodeMovement with the GNGAlgorithm object. This NodeMovement implementation determines how neighbor nodes of the winner are moved.
|
|
Sets the AgeMax parameter of the GNGAlgorithm.
|
|
Sets the MoveWinner parameter of the GNGAlgorithm.
|
|
Sets the MoveNeighbor parameter of the GNGAlgorithm.
|
|
Sets the ErrorDecay parameter of the GNGAlgorithm.
|
|
Finds the two nodes closest to the current input Vector.
|
|
Updates the local error of a node.
Reimplemented in SGNGAlgorithm. |
|
Increases the age of all edges emenating from the node s.
|
|
Moves the winner node s towards the current input vector by a factor of paramMoveWinner. To change the behaviour of winner movment, overload this method.
Reimplemented in SGNGAlgorithm. |
|
Moves a neighbor node s towards the input vector by a factor of paramMoveNeighbor. To change the behaviour of neighbor movment, overload this method.
Reimplemented in SGNGAlgorithm. |
|
Moves the neighbors of the node s towards the input vector.
|
|
Removes edges that are too old.
Reimplemented in SGNGAlgorithm. |
|
Removes nodes that have no edges.
Reimplemented in GNGUAlgorithm. |
|
Decreases the local error of all nodes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dimension of nodes reference Vectors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|