#include <GNG.h>
Inheritance diagram for GNG:
Public Member Functions | |
GNG (classifierparams ¶ms) | |
virtual | ~GNG () |
virtual void | init (FeatureContainer *fc) |
virtual membershiplist | getClusterMembership (const featurevector *sample) |
virtual unsigned long | nextSample () |
virtual unsigned long | nextSample (const featurevector *sample) |
virtual string | serialize () const |
virtual void | unserialize (string data) |
virtual double | getWinnerDistance (const featurevector *sample, unsigned int &cluster_id, unsigned int &meta_cluster_id) const |
virtual unit_list::size_type | getNumberNodes () const |
virtual meta_cluster_list | getMetaClusters () |
virtual string | toString () const |
Static Public Attributes | |
static unsigned | lambda = 10 |
insert a new unit after (lambda * <number of units>) samples | |
static double | minimal_deletion_age = 0.5 |
only delete units which are older than that (their youth must be lower than this value) | |
static double | deletion_threshold = 0.5 |
the threshold for the deletion criterion (it must be lower than this for a node to get deleted) | |
static double | deletion_threshold_lq = 0.15 |
the threshold for the quality measure for learning when deleting a node (it must be lower than this for a node to get deleted) | |
static unsigned long | edge_age_max = 30 |
maximum age of an edge | |
static double | T_short = 6 |
time constant for exponential decrease of the short term error of a winning unit | |
static double | T_long = 170 |
time constant for exponential decrease of the long term error of a winning unit | |
static double | T_youth = 50 |
time constant for exponential decrease of the youth | |
static double | T_insert_threshold = 55 |
static double | adaptation_threshold = 0.0005 |
static double | insertion_tolerance = 0.02 |
static double | lr_winner = 0.15 |
the learning rate of the winning unit | |
static double | lr_neighbor = 0.01 |
the learning rate of all neighbors | |
static double | minimum_lr = 0.2 |
the absolute minimum learning rate | |
static double | lr_insert_threshold = 0.2 |
the learning rate for the insertion threshold | |
static double | helper_T_short = -1 |
static double | helper_T_long = -1 |
static double | helper_T_youth = -1 |
static double | helper_T_insertion_threshold = -1 |
|
Only stores the parameters for later use in init().
|
|
Destructor |
|
Get membership vector This method returns the data for the next steps, which is a list of context classes found by the algorithm with associated membership values. These values specify the membership of the current feature values to each of the context classes in the interval [0; 1]. They can thus by seen as the probabilities that the context classes are currently active.
Implements ClassifierAlgorithm. |
|
|
|
|
|
|
|
This method initializes the helper variables, creates two initial cluster center prototypes by calling getFeatureVector on the given FeatureContainer and stored the FeatureContainer reference for calls to nextSample(). Additionally, it initializes the bit vector for masking feature dimensions by using the given algorithm parameters and the feature dimensions from the retrieved feature vectors.
Implements ClassifierAlgorithm. |
|
Implements ClassifierAlgorithm. |
|
Fetch next sample vector Gets the next sample vector from the configured feature source. This method calls nextSample and getSampleVector on the FeatureContainer given to the init method.
Implements ClassifierAlgorithm. |
|
Serialize a samples data to a string
Implements ClassifierAlgorithm. |
|
This is only for testing. Implements ClassifierAlgorithm. |
|
Unserialize a samples data from a string
Implements ClassifierAlgorithm. |
|
insert a new unit after (lambda * <number of units>) samples GNG parameter
|