Package org.encog.ml.train.strategy

Examples of org.encog.ml.train.strategy.RequiredImprovementStrategy


        XORSQL.SQL_PWD);
   
    // train the neural network
    final MLTrain train = new ResilientPropagation(network, trainingSet);
    // reset if improve is less than 1% over 5 cycles
    train.addStrategy(new RequiredImprovementStrategy(5));
   
    int epoch = 1;

    do {
      train.iteration();
View Full Code Here


  public static void main(String[] args)
  {
    MLDataSet trainingSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
    BasicNetwork network = EncogUtility.simpleFeedForward(2, 4, 0, 1, false);
    ResilientPropagation train = new ResilientPropagation(network, trainingSet);
    train.addStrategy(new RequiredImprovementStrategy(5));
   
    System.out.println("Perform initial train.");
    EncogUtility.trainToError(train,0.01);
    TrainingContinuation cont = train.pause();
    System.out.println(Arrays.toString((double[])cont.getContents().get(ResilientPropagation.LAST_GRADIENTS)));
View Full Code Here

    // third, create the trainer
    MLTrainFactory trainFactory = new MLTrainFactory()
    MLTrain train = trainFactory.create(method,dataSet,trainerName,trainerArgs);       
    // reset if improve is less than 1% over 5 cycles
    if( method instanceof MLResettable && !(train instanceof ManhattanPropagation) ) {
      train.addStrategy(new RequiredImprovementStrategy(500));
    }

    // fourth, train and evaluate.
    EncogUtility.trainToError(train, 0.01);
    EncogUtility.evaluate((MLRegression)method, dataSet);
View Full Code Here

   
    // train the neural network
    final MLTrain train = new ResilientPropagation(network, trainingSet);
    // reset if improve is less than 1% over 5 cycles
    train.addStrategy(new RequiredImprovementStrategy(5));

    EncogUtility.trainToError(train, 0.01);
   
    EncogUtility.evaluate(network, trainingSet);
View Full Code Here

TOP

Related Classes of org.encog.ml.train.strategy.RequiredImprovementStrategy

Copyright © 2018 www.massapicom. 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.