Examples of ElmanPattern


Examples of org.encog.neural.pattern.ElmanPattern

*/
public class ElmanXOR {

  static BasicNetwork createElmanNetwork() {
    // construct an Elman type network
    ElmanPattern pattern = new ElmanPattern();
    pattern.setActivationFunction(new ActivationSigmoid());
    pattern.setInputNeurons(1);
    pattern.addHiddenLayer(6);
    pattern.setOutputNeurons(1);
    return (BasicNetwork)pattern.generate();
  }
View Full Code Here

Examples of org.encog.neural.pattern.ElmanPattern

public class TestSRN  extends TestCase {
 
  public void performElmanTest(int input, int hidden, int ideal)
  {
    // we are really just making sure no array out of bounds errors occur
    ElmanPattern elmanPattern = new ElmanPattern();
    elmanPattern.setInputNeurons(input);
    elmanPattern.addHiddenLayer(hidden);
    elmanPattern.setOutputNeurons(ideal);
    BasicNetwork network = (BasicNetwork)elmanPattern.generate();
    MLDataSet training = RandomTrainingFactory.generate(1000, 5, network.getInputCount(), network.getOutputCount(), -1, 1);
    ResilientPropagation prop = new ResilientPropagation(network,training);
    prop.iteration();
    prop.iteration();   
  }
View Full Code Here

Examples of org.encog.neural.pattern.ElmanPattern

  private static MLMethod createElman() {
    CreateElmanDialog dialog = new CreateElmanDialog(EncogWorkBench
        .getInstance().getMainWindow());
    if (dialog.process()) {
      ElmanPattern elman = new ElmanPattern();
      elman.setInputNeurons(dialog.getInputCount().getValue());
      elman.addHiddenLayer(dialog.getHiddenCount().getValue());
      elman.setOutputNeurons(dialog.getOutputCount().getValue());
      elman.setActivationFunction(new ActivationTANH());
      return elman.generate();
    } else
      return null;

  }
View Full Code Here

Examples of org.encog.neural.pattern.ElmanPattern

public class TestSRN  extends TestCase {
 
  public void performElmanTest(int input, int hidden, int ideal)
  {
    // we are really just making sure no array out of bounds errors occur
    ElmanPattern elmanPattern = new ElmanPattern();
    elmanPattern.setInputNeurons(input);
    elmanPattern.addHiddenLayer(hidden);
    elmanPattern.setOutputNeurons(ideal);
    BasicNetwork network = (BasicNetwork)elmanPattern.generate();
    MLDataSet training = RandomTrainingFactory.generate(1000, 5, network.getInputCount(), network.getOutputCount(), -1, 1);
    ResilientPropagation prop = new ResilientPropagation(network,training);
    prop.iteration();
    prop.iteration();   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.