SetRowWidthEx(newWidth: Integer; layerIndex: Integer): Integer;
SetRowWidthEx(newWidth: integer; layerIndex: integer): integer;
newWidth. Number of lines.
layerIndex. Layer index.
The SetRowWidthEx method sets the number of lines in the specified layer of a Kohonen self-organizing map.
Indexation of the layers is continuous and starts with zero. The SetRowWidthEx method returns the current number of lines in the output layer of the map and is similar to the INeuralNetwork.SetRowWidth method.
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 system assembly.
Function m_SetRowEx(Net: NeuralNetwork): NeuralNetwork;
Var
layerCount, i: Integer;
Begin
layerCount := Net.GetNumberOfLayers;
For i := 1 To layerCount - 1 Do
If Net.GetRowWidthEx(i) = 1 Then
Net.SetRowWidthEx(2, i);
End If;
End For;
Return Net;
End Function m_SetRowEx;
After executing the example the number of lines is set for all map layers.
As an example, a function is given, which input has a Kohonen self-organizing map fed into (the Net parameter).
Imports Prognoz.Platform.Interop.NN;
…
Public Shared Function m_SetRowEx(Net: NeuralNetwork): NeuralNetwork;
Var
layerCount, i: Integer;
Begin
layerCount := Net.GetNumberOfLayers();
For i := 1 To layerCount - 1 Do
If Net.GetRowWidthEx(i) = 1 Then
Net.SetRowWidthEx(2, i);
End If;
End For;
Return Net;
End Function;
After executing the example the number of lines is set for all map layers.
See also: