Package org.encog.neural.networks.training

Examples of org.encog.neural.networks.training.TrainingError


   *            the currentFold to set
   */
  public void setCurrentFold(final int theCurrentFold) {

    if (this.owner != null) {
      throw new TrainingError(
          "Can't set the fold on a non-top-level set.");
    }

    if (theCurrentFold >= this.numFolds) {
      throw new TrainingError(
    "Can't set the current fold to be greater than "
          + "the number of folds.");
    }
    this.currentFold = theCurrentFold;
    this.currentFoldOffset = this.foldSize * this.currentFold;
 
View Full Code Here


   */
  public void init(final MLTrain train) {
    this.train = train;
   
    if( !(train.getMethod() instanceof MLResettable) ) {
      throw new TrainingError("To use the required improvement strategy the machine learning method must support MLResettable.");
    }
   
    this.method = (MLResettable)this.train.getMethod();
  }
View Full Code Here

   */
  public void init(final MLTrain train) {
    this.train = train;
   
    if( !(train.getMethod() instanceof MLResettable) ) {
      throw new TrainingError("To use the reset strategy the machine learning method must support MLResettable.");
    }
   
    this.method = (MLResettable)this.train.getMethod();
  }
View Full Code Here

  public void init(final MLTrain train) {
    this.train = train;
    this.ready = false;
   
    if( !(train.getMethod() instanceof MLEncodable) ) {
      throw new TrainingError("To make use of the Greedy strategy the machine learning method must support MLEncodable.");
    }
   
    this.method = ((MLEncodable)train.getMethod());
    this.lastNetwork = new double[this.method.encodedArrayLength()];
  }
View Full Code Here

  @Override
  public void setThreadCount(int numThreads) {
    if( this.hessian instanceof MultiThreadable ) {
      ((MultiThreadable)this.hessian).setThreadCount(numThreads);
    } else if(numThreads!=1 && numThreads!=0) {
      throw new TrainingError("The Hessian object in use("+this.hessian.getClass().toString()+") does not support multi-threaded mode.");
    }
  } 
View Full Code Here

TOP

Related Classes of org.encog.neural.networks.training.TrainingError

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.