SetInputValuesConvex(Var InputValues: Array; alfa: Double);
InputValues. Real array of network input values.
alfa. Transformation coefficient. The value is in the range [0.0; 1.0].
The SetInputValuesConvex method sets network input values by means of convex combinatorial transformation.
Convex combinatorial transformation is performed according to the formula:
Vi = alfa(t) * Vi + (1-alfa(t)) * (1/sqrt(number_of_network_inputs))
This method makes the process of Kohonen self-organizing maps learning more accurate. In the beginning of the learning the alfa coefficient approximately equals to zero and all the input values are approximately equal. Further on, value of the alfa coefficient tends to zero and the input values tend to vary more.
Sequential execution of the NeuralNetwork.SetInputValues and INeuralNetwork.ApplyConvexCombinationFactor methods is similar to execution of SetInputValuesConvex.
As an example, a function is given, which input has neural network fed into (the Net parameter). To execute the example, add links to the NN and MathFin system assemblies.
Function m_SetInputValuesConvex(Net: NeuralNetwork): NeuralNetwork;
Var
InputCount, i: Integer;
InputVal: Array Of Double;
Begin
InputCount := Net.GetNumberOfInputs;
InputVal := New Double[InputCount];
For i := 0 To InputVal.Length - 1 Do
InputVal[i] := math.RandBetween(0.1, 1.0);
End For;
Net.SetInputValuesConvex(InputVal, 0.2);
Return Net;
End Function m_SetInputValuesConvex;
After executing the example network input values are assigned by means of the convex combinatorial transformation.
See also: