Package org.encog.ml.train

Examples of org.encog.ml.train.MLTrain.iteration()


    trainMain.addStrategy(new HybridStrategy(trainAlt));
    trainMain.addStrategy(stop);

    int epoch = 0;
    while (!stop.shouldStop()) {
      trainMain.iteration();
      System.out.println("Training " + what + ", Epoch #" + epoch
          + " Error:" + trainMain.getError());
      epoch++;
    }
    return trainMain.getError();
View Full Code Here


      this.currentJob.createTrainer(this.manager.isSingleThreaded());
      final MLTrain train = this.currentJob.getTrain();
      int interation = 1;

      while (this.currentJob.shouldContinue()) {
        train.iteration();
        interation++;
      }
      watch.stop();
    } catch (final Throwable t) {
      this.currentJob.setError(t);
View Full Code Here

    final MLTrain train = new ResilientPropagation(network, training);

    int epoch = 1;

    do {
      train.iteration();
      System.out
          .println("Epoch #" + epoch + " Error:" + train.getError());
      epoch++;
    } while(train.getError() > MAX_ERROR);
  }
View Full Code Here

    // train the neural network
    final MLTrain train = new ResilientPropagation(network, trainingSet);

    do {
      train.iteration();
    } while (train.getError() > 0.009);

    double e = network.calculateError(trainingSet);
    System.out.println("Network traiined to error: " + e);
View Full Code Here

    train.addStrategy(new RequiredImprovementStrategy(5));
   
    int epoch = 1;

    do {
      train.iteration();
      System.out
          .println("Epoch #" + epoch + " Error:" + train.getError());
      epoch++;
    } while(train.getError() > 0.01);
View Full Code Here

        //SVD is a single step solve
        int epoch = 1;
        do
        {
            train.iteration();
            System.out.println("Epoch #" + epoch + " Error:" + train.getError());
            epoch++;
        } while ((epoch < 1) && (train.getError() > 0.001));

        // test the neural network
View Full Code Here

    MLDataSet training = generateTraining();
    MLTrain train = new TrainAdaline(network,training,0.01);
   
    int epoch = 1;
    do {
      train.iteration();
      System.out
          .println("Epoch #" + epoch + " Error:" + train.getError());
      epoch++;
    } while(train.getError() > 0.01);
   
View Full Code Here

    Stopwatch sw = new Stopwatch();
    sw.start();
    // run epoch of learning procedure
    for (int i = 0; i < ITERATIONS; i++) {
      train.iteration();
    }
    sw.stop();

    return sw.getElapsedMilliseconds();
  }
View Full Code Here

    final long stop = start + (10 * MILIS);

    int iterations = 0;
    while (System.currentTimeMillis() < stop) {
      iterations++;
      train.iteration();
    }

    return iterations;
  }

View Full Code Here

  {
    int epoch = 1;

    MLTrain train = new TrainInstar(network,training,0.1,true);
    do {
      train.iteration();
      System.out
          .println("Training instar, Epoch #" + epoch + ", Error: " + train.getError() );
      epoch++;
    } while(train.getError()>0.01);
  }
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.