classPiiSomOperation
#include <PiiSomOperation.h>
An Ydin-compatible SOM classifier operation.
Inherits PiiVectorQuantizerOperation
Description
SOM is a non-supervised learning machine. Thus, it does not need a class label input. See the description of input and output sockets in PiiClassifierOperation. As most classifiers, the SOM comes in a couple of different forms specialized for a certain data type. SOM supports float (often somewhat faster due to better data locality) and double (more accurate). Int is not supported because the code vectors need to be stored in floating point accuracy. To instantiate the operation from an object registry, one must specify the data type, e.g. "PiiSomOperation<double>".
Outputs
Properties
|
double
|
The current learning rate (read only). |
|
double
|
The current radius (read only). |
|
int
|
The number of nodes in vertical direction. |
|
double
|
The initial learning rate. |
|
double
|
The initial radius of the neighborhood affected in training. |
|
Initialization mode. |
|
|
int
|
The (zero-based) index of the current training iteration. |
|
The learning algorithm. |
|
|
int
|
The maximum number of vectors used for training. |
|
Learning rate function. |
|
|
The size of the SOM map. |
|
|
SOM topology. |
|
|
int
|
The number of nodes in horizontal direction. |
Public member functions
|
virtual QVariant
|
Returns the value of a property associated with socket. |
Protected member functions
|
virtual double
|
( )
= 0
|
|
virtual double
|
( )
= 0
|
|
int
|
( )
|
|
virtual double
|
( )
= 0
|
|
virtual double
|
( )
= 0
|
|
virtual PiiClassification::SomInitMode
|
( )
= 0
|
|
virtual int
|
( )
= 0
|
|
( )
= 0
|
|
|
virtual int
|
( )
= 0
|
|
( )
= 0
|
|
|
void
|
(
|
|
virtual void
|
(
|
|
virtual void
|
(
|
|
virtual void
|
|
|
virtual void
|
(
|
|
virtual void
|
|
|
virtual void
|
(
|
|
virtual void
|
|
|
void
|
|
|
virtual void
|
|
|
void
|
(
|
|
( )
|
|
|
virtual PiiClassification::SomTopology
|
( )
= 0
|
|
int
|
( )
|
Property details
-
double currentLearningRate
[read]The current learning rate (read only).
-
double currentRadius
[read]The current radius (read only).
-
int height
[read, write]The number of nodes in vertical direction.
-
double initialLearningRate
[read, write]The initial learning rate.
This value determines the "strength" of the training. Larger value means that larger changes to the map are allowed by a single incoming vector.
-
double initialRadius
[read, write]The initial radius of the neighborhood affected in training.
-
PiiClassification::SomInitMode initMode
[read, write]Initialization mode.
The default value is
PiiClassification::SomSampleInit. -
int iterationNumber
[read, write]The (zero-based) index of the current training iteration.
This property is useful when one needs to retrain a SOM map. Setting the
iterationNumberproperty to zero (together with thetrainingproperty set totrue) makes the map strongly adapt to incoming data. The effect is that the map is trained again, but the training is not started from a random state. If only fine-tuning is needed, one can set the value to anything between 0 andlearningLength. -
PiiClassification::SomLearningAlgorithm learningAlgorithm
[read, write]The learning algorithm.
The default value is
PiiClassification::SomSequentialAlgorithm. -
int learningLength
[read, write]The maximum number of vectors used for training.
Once this many vectors have been used in training, the map stops adapting.
-
PiiClassification::SomRateFunction rateFunction
[read, write]Learning rate function.
-
QSize size
[read, write]The size of the SOM map.
The code book will be deleted if the size changes. To build a new one, you need to set
trainingtotrue. The default map size is 10-by-10. -
PiiClassification::SomTopology topology
[read, write]SOM topology.
-
int width
[read, write]The number of nodes in horizontal direction.
Function details
-
Returns the value of a property associated with socket.
If name is "name", returns the
objectNameproperty of socket. Otherwise returns the named property. If socket is not attached to this operation, returns an invalid QVariant.Reimplemented from PiiBasicOperation.
-
virtual double currentLearningRate
()[protected, pure virtual] -
virtual double currentRadius
()[protected, pure virtual] -
int height
()[protected] -
virtual double initialLearningRate
()[protected, pure virtual] -
virtual double initialRadius
()[protected, pure virtual] -
-
virtual int iterationNumber
()[protected, pure virtual] -
-
virtual int learningLength
()[protected, pure virtual] -
-
void setHeight
(- int height
[protected] -
virtual void setInitialLearningRate
(- double initialLearningRate
[protected, pure virtual] -
virtual void setInitialRadius
(- double initialRadius
[protected, pure virtual] -
-
virtual void setIterationNumber
(- int iterationNumber
[protected, pure virtual] -
virtual void setLearningAlgorithm
[protected, pure virtual] -
virtual void setLearningLength
(- int learningLength
[protected, pure virtual] -
virtual void setRateFunction
[protected, pure virtual] -
-
-
void setWidth
(- int width
[protected] -
-
-
int width
()[protected]
Add a note
Not a single note added yet. Be the first, add yours.