Examples of shouldStop()


Examples of org.encog.ml.train.strategy.StopTrainingStrategy.shouldStop()

    Assert.assertFalse(strategy.shouldStop());
    mock.iteration();
    mock.iteration();
    mock.iteration();
    mock.iteration();
    Assert.assertTrue(strategy.shouldStop());
  }
 
  public void testGreedy()
  {
    FeedForwardPattern pattern = new FeedForwardPattern();
View Full Code Here

Examples of org.encog.ml.train.strategy.StopTrainingStrategy.shouldStop()

      train.addStrategy(strat);
      train.setThreadCount(1); // force single thread mode

      for (int i = 0; (i < this.iterations) && !getShouldStop()
          && !strat.shouldStop(); i++) {
        train.iteration();
      }

      error = Math.min(error, train.getError());
    }
View Full Code Here

Examples of org.encog.ml.train.strategy.StopTrainingStrategy.shouldStop()

  {
    StopTrainingStrategy strategy = new StopTrainingStrategy(0.01,2);
    MockTrain mock = new MockTrain();
    mock.addStrategy(strategy);
    mock.setError(0.05);
    Assert.assertFalse(strategy.shouldStop());
    mock.iteration();
    mock.iteration();
    mock.iteration();
    mock.iteration();
    Assert.assertTrue(strategy.shouldStop());
View Full Code Here

Examples of org.encog.ml.train.strategy.StopTrainingStrategy.shouldStop()

    Assert.assertFalse(strategy.shouldStop());
    mock.iteration();
    mock.iteration();
    mock.iteration();
    mock.iteration();
    Assert.assertTrue(strategy.shouldStop());
  }
 
  public void testGreedy()
  {
    FeedForwardPattern pattern = new FeedForwardPattern();
View Full Code Here

Examples of org.encog.ml.train.strategy.end.EndTrainingStrategy.shouldStop()

   */
  public boolean isTrainingDone() {
    for (Strategy strategy : this.strategies) {
      if (strategy instanceof EndTrainingStrategy) {
        EndTrainingStrategy end = (EndTrainingStrategy)strategy;
        if( end.shouldStop() ) {
          return true;
        }
      }
    }
   
View Full Code Here

Examples of org.encog.ml.train.strategy.end.EndTrainingStrategy.shouldStop()

  public final boolean shouldContinue() {
    for (final Strategy strategy : this.train.getStrategies()) {
      if (strategy instanceof EndTrainingStrategy) {
        final EndTrainingStrategy end = (EndTrainingStrategy) strategy;

        if (end.shouldStop()) {
          return false;
        }
      }
    }
    return true;
View Full Code Here

Examples of org.encog.ml.train.strategy.end.EndTrainingStrategy.shouldStop()

   */
  public boolean isTrainingDone() {
    for (Strategy strategy : this.strategies) {
      if (strategy instanceof EndTrainingStrategy) {
        EndTrainingStrategy end = (EndTrainingStrategy)strategy;
        if( end.shouldStop() ) {
          return true;
        }
      }
    }
   
View Full Code Here

Examples of org.encog.ml.train.strategy.end.EndTrainingStrategy.shouldStop()

   */
  public boolean isTrainingDone() {
    for (Strategy strategy : this.strategies) {
      if (strategy instanceof EndTrainingStrategy) {
        EndTrainingStrategy end = (EndTrainingStrategy)strategy;
        if( end.shouldStop() ) {
          return true;
        }
      }
    }
   
View Full Code Here

Examples of org.encog.ml.train.strategy.end.EndTrainingStrategy.shouldStop()

  public boolean shouldContinue() {
    for (final Strategy strategy : this.train.getStrategies()) {
      if (strategy instanceof EndTrainingStrategy) {
        final EndTrainingStrategy end = (EndTrainingStrategy) strategy;

        if (end.shouldStop()) {
          return false;
        }
      }
    }
    return true;
View Full Code Here

Examples of org.wikipediacleaner.api.MediaWiki.shouldStop()

      mw.retrieveSectionContents(wiki, mapTalkPages.values(), 0, false);
    } else {
      mw.retrieveContents(wiki, mapTalkPages.values(), false, false, false, false);
    }
    mw.retrieveContents(wiki, mapTodoSubpages.values(), true, false, false, false);
    if (mw.shouldStop()) {
      return;
    }

    // Update warning
    for (Page page : pages) {
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.