INeuralNetwork.SetInputValuesConvexEx

Fore Syntax

SetInputValuesConvexEx(Var InputValues: Array; alfa: Double; doNormalize: Boolean);

Fore.NET Syntax

SetInputValuesConvexEx(Var InputValues: System.Array; alfa: Double; doNormalize: Boolean);

Parameters

InputValues. Real array of network input values.

alfa. Transformation coefficient. The value is in the range [0.0; 1.0].

doNormalize. The parameter determines whether to normalize input values.

Description

The SetInputValuesConvexEx method sets network input values by using convex combinatorial transformation and possibility of normalization.

Comments

Convex combinatorial transformation is performed according to the formula:

Vi = alfa(t) * Vi + (1-alfa(t)) * (1/sqrt(number_of_network_inputs))

Available values of the doNormalize parameter:

Fore Example

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_SetInputValuesConvexEx(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.11.0);
    End For;
    Net.SetInputValuesConvexEx(InputVal, 0.2True);
    Return Net;
End Function m_SetInputValuesConvexEx;

After executing the example the network input values are assigned by means of convex combinatorial transformation. The data is normalized.

Fore.NET Example

As an example, a function is given, which input has neural network fed into (the Net parameter).

Imports Prognoz.Platform.Interop.NN;
Imports Prognoz.Platform.Interop.MathFin;

Public Shared Function m_SetInputValuesConvexEx(Net: NeuralNetwork): NeuralNetwork;
Var
    InputCount, i: Integer;
    InputVal: System.Array;
    ValGen: Prognoz.Platform.Interop.MathFin.Math;
Begin
    InputCount := Net.GetNumberOfInputs();
    InputVal := New Double[InputCount];
    ValGen := New Prognoz.Platform.Interop.MathFin.Math.Create();
    For i := 0 To InputVal.Length - 1 Do
        InputVal[i] := ValGen.RandBetween(0.11.0);
    End For;
    Net.SetInputValuesConvexEx(Var InputVal, 0.2True);
    Return Net;
End Function m_SetInputValuesConvexEx;

After executing the example the network input values are assigned by means of convex combinatorial transformation. The data is normalized.

See also:

INeuralNetwork