![]() |
|
#include <Som.h>
Public Member Functions | |
| Som (int width=0, int height=0) | |
| void | setGeometry (int width, int height) |
| void | fill (const T &sample) |
| void | initialise (void(*init)(T &x)) |
| Initialise the map with a user-defined function. | |
| void | setNeighbourhoodRadius (double r) |
| void | setLearningCoefficient (double c) |
| void | setDistanceFunction (double(*d)(const T &x1, const T &x2)) |
| void | setMixingFunction (void(*mix)(const T &x1, const T &x2, double coeff, T &m)) |
| int | getHeight () const |
| The number of rows in the map. | |
| int | getWidth () const |
| The number of columns in the map. | |
| void | findBestMatchingUnit (const T &sample, int &iBest, int &jBest) |
| Finds the unit with state closesest to that of sample. | |
| void | train (const T &x) |
| Training with a single sample. | |
| void | train (const T &x, int iBest, int jBest) |
| void | toStream (std::ostream &ostr) const |
| double | defaultNeighborhoodFunction (const int &i, const int &j) const |
Static Public Member Functions | |
| static double | defaultDistanceMetric (const T &x1, const T &x2) |
| static void | defaultMixingFunction (const T &x1, const T &x2, double coeff, T &m) |
Public Attributes | |
| std::vector< std::vector< T > > | map |
| The actual neural network, two-dimensional map of units. | |
Protected Attributes | |
| double(* | distanceFunction )(const T &x1, const T &x2) |
| The similarity metric applied in finding the best-matching unit. | |
| void(* | mixingFunction )(const T &x1, const T &x2, double alpha, T &result) |
| Given objects x1 and x1 and a mixing coefficient coeff , outputs mixed object m. | |
| std::string | title |
| int | width |
| int | height |
| double | radius2 |
| The radius of the neighbourhood kernel applied in training;. | |
| double | learningCoefficient |
| The radius of the neighbourhood kernel applied in training;. | |
The Self-Organising Map by Teuvo Kohonen.
The template
The coordinates of the map apply matrix convention ie. map[i][j] refers to element j on row i. The map is implemented a std::vector<std::vector<T> > .
Set each neuron in the map to given value.
|
inline |
Finds the unit with state closesest to that of sample.
Initialise the map with a user-defined function.
The user defined function with signature
should initialize
| height | the height recipient set |
Training with a single sample.
Calls findBestMatchingUnit() and uses *mixingFunction to tune the unit.
Training with a single sample.
|
protected |
Given objects x1 and x1 and a mixing coefficient coeff , outputs mixed object m.
One might think of mixing two std::strings, for example.
1.9.8