Examples of MLTrainFactory


Examples of org.encog.ml.factory.MLTrainFactory

   
    // second, create the data set   
    MLDataSet dataSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
   
    // 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));
    }
View Full Code Here

Examples of org.encog.ml.factory.MLTrainFactory

   * @return The trainer.
   */
  private MLTrain createTrainer(final MLMethod method,
      final MLDataSet trainingSet) {

    final MLTrainFactory factory = new MLTrainFactory();

    final String type = getProp().getPropertyString(
        ScriptProperties.ML_TRAIN_TYPE);
    final String args = getProp().getPropertyString(
        ScriptProperties.ML_TRAIN_ARGUMENTS);
   
    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "training type:" + type);
    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "training args:" + args);
   
    if( method instanceof MLResettable ) {
      this.getAnalyst().setMethod(method);
    }


    MLTrain train = factory.create(method, trainingSet, type, args);

    if (this.kfold > 0) {
      train = new CrossValidationKFold(train, this.kfold);
    }

View Full Code Here

Examples of org.encog.ml.factory.MLTrainFactory

   * @return The trainer.
   */
  private MLTrain createTrainer(final MLMethod method,
      final MLDataSet trainingSet) {

    final MLTrainFactory factory = new MLTrainFactory();

    final String type = getProp().getPropertyString(
        ScriptProperties.ML_TRAIN_TYPE);
    final String args = getProp().getPropertyString(
        ScriptProperties.ML_TRAIN_ARGUMENTS);
   
    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "training type:" + type);
    EncogLogging.log(EncogLogging.LEVEL_DEBUG, "training args:" + args);
   
    if( method instanceof MLResettable ) {
      this.getAnalyst().setMethod(method);
    }


    MLTrain train = factory.create(method, trainingSet, type, args);

    if ( getKfold() > 0) {
      train = new CrossValidationKFold(train, getKfold() );
    }

View Full Code Here

Examples of org.encog.ml.factory.MLTrainFactory

    if (this.trainingType == null) {
      throw new EncogError(
          "Please call selectTraining first to choose how to train.");
    }
    MLTrainFactory trainFactory = new MLTrainFactory();
    MLTrain train = trainFactory.create(method, dataset, this.trainingType,
        this.trainingArgs);
    return train;
  }
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.