GClasses
|
Initializes the weights to a random sample of rows from the training set.
#include <GSelfOrganizingMap.h>
Public Member Functions | |
NodeWeightInitializationTrainingSetSample (GRand &rand) | |
Create a TraningSetSample object that uses the random numbers generated by pRand. rand is assumed to have a lifetime exceeding the lifetime of this object. More... | |
virtual | ~NodeWeightInitializationTrainingSetSample () |
Virtual destructor for good memory hygiene. More... | |
virtual void | setWeights (std::vector< Node > &nodes, GDistanceMetric &weightDistance, const GMatrix *pIn) const |
Sets the weights of the nodes in the vector nodes to the a random sample of the rows of pIn chosen without replacement. Note that there must be at least as many vectors in pIn as there are nodes in nodes. Also, note that in the current implementation, if the number of nodes is close to the number of weights, selecting without replacement can take a very long time. More... | |
Public Member Functions inherited from GClasses::SOM::NodeWeightInitialization | |
virtual | ~NodeWeightInitialization () |
Virtual destructor for good memory hygiene. More... | |
GClasses::SOM::NodeWeightInitializationTrainingSetSample::NodeWeightInitializationTrainingSetSample | ( | GRand & | rand | ) |
Create a TraningSetSample object that uses the random numbers generated by pRand. rand is assumed to have a lifetime exceeding the lifetime of this object.
|
inlinevirtual |
Virtual destructor for good memory hygiene.
|
virtual |
Sets the weights of the nodes in the vector nodes to the a random sample of the rows of pIn chosen without replacement. Note that there must be at least as many vectors in pIn as there are nodes in nodes. Also, note that in the current implementation, if the number of nodes is close to the number of weights, selecting without replacement can take a very long time.
see comment on NodeWeightInitialization::setWeights
Implements GClasses::SOM::NodeWeightInitialization.