Generate() public method

Generate the Elman neural network.
public Generate ( ) : IMLMethod
return IMLMethod
Example #1
0
        public static IMLMethod CreateElmanNetwork(int inputsize, int outputsize)
        {
            // construct an Elman type network
            ElmanPattern pattern = new ElmanPattern();

            pattern.ActivationFunction = new ActivationTANH();
            pattern.InputNeurons = inputsize;

            pattern.AddHiddenLayer(0);
            pattern.OutputNeurons = outputsize;
            return pattern.Generate();
        }
Example #2
0
 /// <summary>
 ///     Creates the elman network as a basicnetwork.
 ///     This method create a elmhan patterns but returns a basic network (ready for load/save).
 /// </summary>
 /// <param name="inputsize">The inputsize.</param>
 /// <param name="outputsize">The outputsize.</param>
 /// <param name="hiddenlayers">The hiddenlayers.</param>
 /// <param name="activate">The activation function to use..</param>
 /// <returns>a basic network</returns>
 public static BasicNetwork CreateElmanNetwork(int inputsize, int outputsize, int hiddenlayers,
                                               IActivationFunction activate)
 {
     // construct an Elman type network
     var pattern = new ElmanPattern {ActivationFunction = activate, InputNeurons = inputsize};
     pattern.AddHiddenLayer(hiddenlayers);
     pattern.OutputNeurons = outputsize;
     return (BasicNetwork) pattern.Generate();
 }
 private IMLMethod CreateElmanNetwork(int input)
 {
     // construct an Elman type network
     var pattern = new ElmanPattern
     {
         InputNeurons = input
     };
     pattern.AddHiddenLayer(2);
     pattern.OutputNeurons = 1;
     return pattern.Generate();
 }
 private IMLMethod CreateElmanNetwork(int input)
 {
     // construct an Elman type network
     var pattern = new ElmanPattern
         {
             ActivationFunction = new ActivationSigmoid(),
             InputNeurons = input
         };
     pattern.AddHiddenLayer(5);
     pattern.OutputNeurons = 1;
     return pattern.Generate();
 }