INeuralNetwork.LearnSOFM

Syntax

LearnSOFM;

Description

The LearnSOFM method learns a Kohonen self-organizing map.

Comments

Values of synapse weights are corrected in the process of learning.

Short learning algorithm:

Process of learning can be repeated several times. One iteration is called an epoch of learning.

Example

As an example, a function is given, which input has a Kohonen self-organizing map fed into (the Net parameter). To execute the example, add links to the NN, IO system assemblies.

Function m_Learn(Net: NeuralNetwork): NeuralNetwork;
Var
    epoch, learnRadius: Integer;
    learnRate: Double;
    NetFile: File;
    TextW: ITextWriter;
Begin
    TextW := NetFile.OpenTextWriter("C:/LearnRes.txt"True);
    For epoch := 1 To 300 Do
        learnRate := 0.6 * ((300 - epoch) / 300);
        learnRadius := (3 * ((300 - epoch) / 350)) As Integer;
        Net.SetLearnRadius(learnRadius);
        Net.SetLearnRate(learnRate);
        Net.SetUseVectorScalar(True);
        Net.PropagateSOFM;
        Net.LearnSOFM;
        TextW.WriteLnString("Epoch of learning '" + epoch.ToString + "'. Error Code  " + Net.GetError.ToString);
    End For;
    Return Net;
End Function m_Learn;

After executing the example the network is learned. The algorithm of scalar multiple vector multiplication is used to calculate the distance between neurons. Results are written to the file C:/LearnRes.txt.

See also:

INeuralNetwork