Inheritance: INeuralNetworkPattern
 private IMLMethod CreateElmanNetwork()
 {
     // construct an Elman type network
     var pattern = new ElmanPattern();
     pattern.ActivationFunction = new ActivationSigmoid();
     pattern.InputNeurons = 1;
     pattern.AddHiddenLayer(6);
     pattern.OutputNeurons = 1;
     return pattern.Generate();
 }
        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();
        }
Exemple #3
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();
 }