Into

Modules

Documentation

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

xthe x coordinate of the closest node on the SOM map
ythe y coordinate of the closest node on the SOM map

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
virtual double
( )  = 0
int
( )
virtual double
virtual double
( )  = 0
( )  = 0
virtual int
( )  = 0
( )  = 0
virtual int
( )  = 0
( )  = 0
void
(
  • int height
)
virtual void
(
  • double initialLearningRate
)  = 0
virtual void
(
  • double initialRadius
)  = 0
virtual void
virtual void
(
  • int iterationNumber
)  = 0
virtual void
virtual void
(
  • int learningLength
)  = 0
virtual void
void
( )
virtual void
void
(
  • int width
)
( )
( )  = 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 iterationNumber property to zero (together with the training property set to true) 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 and learningLength.

  • 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 training to true. 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

  • virtual QVariant socketProperty

    ( )
    [virtual]

    Returns the value of a property associated with socket.

    If name is "name", returns the objectName property 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 PiiClassification::SomInitMode initMode

    ()
    [protected, pure virtual]
  • virtual int iterationNumber

    ()
    [protected, pure virtual]
  • virtual PiiClassification::SomLearningAlgorithm learningAlgorithm

    ()
    [protected, pure virtual]
  • virtual int learningLength

    ()
    [protected, pure virtual]
  • virtual PiiClassification::SomRateFunction rateFunction

    ()
    [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 setInitMode

    [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 setSize

    ( )
    [protected]
  • virtual void setTopology

    [protected, pure virtual]
  • void setWidth

    (
    • int width
    )
    [protected]
  • QSize size

    ()
    [protected]
  • virtual PiiClassification::SomTopology topology

    ()
    [protected, pure virtual]
  • int width

    ()
    [protected]
Notes (0)

Add a note

Not a single note added yet. Be the first, add yours.