Examples of MLTrain


Examples of org.encog.ml.train.MLTrain

  public void testLMA() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain rprop = new LevenbergMarquardtTraining(network, trainingData);
    NetworkUtil.testTraining(rprop,0.03);
  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();

    MLTrain bprop = new Backpropagation(network, trainingData, 0.7, 0.9);
    NetworkUtil.testTraining(bprop,0.01);
  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

  public void testManhattan() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain bprop = new ManhattanPropagation(network, trainingData, 0.01);
    NetworkUtil.testTraining(bprop,0.01);
  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

  public void testSCG() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain bprop = new ScaledConjugateGradient(network, trainingData);
    NetworkUtil.testTraining(bprop,0.04);
  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

    pattern.setOutputNeurons(1);
    BasicNetwork network = (BasicNetwork)pattern.generate();
   
    // train it
    MLDataSet training = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
    MLTrain train = new TrainAdaline(network,training,0.01);
    NetworkUtil.testTraining(train,0.01);
  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

 
  public static void main(String args[])
  {
    BasicNetwork network = createNetwork();
   
    MLTrain train;
   
    if( args.length>0 && args[0].equalsIgnoreCase("anneal"))
    {
      train = new NeuralSimulatedAnnealing(
          network, new PilotScore(), 10, 2, 100);
    }
    else
    {
      train = new NeuralGeneticAlgorithm(
          network, new FanInRandomizer(),
          new PilotScore(),500, 0.1, 0.25);
    }
   
    int epoch = 1;

    for(int i=0;i<50;i++) {
      train.iteration();
      System.out
          .println("Epoch #" + epoch + " Score:" + train.getError());
      epoch++;
    }

    System.out.println("\nHow the winning network landed:");
    network = (BasicNetwork)train.getMethod();
    NeuralPilot pilot = new NeuralPilot(network,true);
    System.out.println(pilot.scorePilot());
    Encog.getInstance().shutdown();
  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

  private void performADALINE(ProjectEGFile file, MLDataSet trainingData) {
    InputADALINE dialog = new InputADALINE();
    if (dialog.process()) {
      double learningRate = dialog.getLearningRate().getValue();

      MLTrain train = new TrainAdaline((BasicNetwork) file.getObject(),
          trainingData, learningRate);
      startup(file, train, dialog.getMaxError().getValue() / 100.0);
    }

  }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

     
      if( kFold>0 ) {
        trainingData = this.wrapTrainingData(trainingData);
      }

      MLTrain train = new Backpropagation((BasicNetwork) file.getObject(),
          trainingData, learningRate, momentum);
     
      if( kFold>0 ) {
        train = this.wrapTrainer(trainingData,train,kFold);
      }
View Full Code Here

Examples of org.encog.ml.train.MLTrain

      if( kFold>0 ) {
        trainingData = this.wrapTrainingData(trainingData);
      }
     
      MLTrain train = new ManhattanPropagation(
          (BasicNetwork) file.getObject(), trainingData, learningRate);
     
      if( kFold>0 ) {
        train = this.wrapTrainer(trainingData,train,kFold);
      }     
View Full Code Here

Examples of org.encog.ml.train.MLTrain

     
      if( kFold>0 ) {
        trainingData = this.wrapTrainingData(trainingData);
      }
     
      MLTrain train = new ResilientPropagation(
          (ContainsFlat) file.getObject(), trainingData,
          initialUpdate, maxStep);
     
      switch( dialog.getRpropType().getSelectedIndex() )
      {
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.