Examples of train()


Examples of com.aliasi.classify.DynamicLMClassifier.train()

   String[] trainingFiles = classDir.list();
   for (int j=0; j<trainingFiles.length; ++j)
   {
    String text = Files.readFromFile(new File(classDir,trainingFiles[j]));
    logger.debug("Training on " + CATEGORIES[i] + File.separator + trainingFiles[j]);
    classifier.train(CATEGORIES[i], text);
   } //*-- end of inner for
  } //*-- end of outer for
  //*-- end of training

  //*-- dump the classification model to a file
View Full Code Here

Examples of com.aliasi.classify.DynamicLMClassifier.train()

   String[] trainingFiles = classDir.list();
   for (int j = 0; j < trainingFiles.length; ++j)
   {
    String text = Files.readFromFile(new File(classDir,trainingFiles[j]));
    logger.debug("Training on " + CATEGORIES[i] + File.separator + trainingFiles[j]);
    classifier.train(CATEGORIES[i], text);
   } //*-- end of inner for
  } //*-- end of outer for
  //*-- end of training

  //*-- dump the classification model to a file
View Full Code Here

Examples of com.aliasi.classify.DynamicLMClassifier.train()

   String[] trainingFiles = classDir.list();
   for (int j = 0; j < trainingFiles.length; ++j)
   {
    String text = Files.readFromFile(new File(classDir,trainingFiles[j]));
    logger.debug("Training on " + CATEGORIES[i] + File.separator + trainingFiles[j]);
    classifier.train(CATEGORIES[i], text);
   } //*-- end of inner for
  } //*-- end of outer for
  //*-- end of training

  //*-- dump the classification model to a file
View Full Code Here

Examples of com.clearnlp.classification.algorithm.AbstractAdaGrad.train()

    }
   
    AbstractModel model = space.getModel();
   
    model.initWeightVector();
    algorithm.train(space);

    return model;
  }

  static public void main(String[] args)
View Full Code Here

Examples of com.clearnlp.component.tagger.EnglishOnlinePOSTagger.train()

    {
      reader.open(UTInput.createBufferedFileReader(trainFile));
     
      while ((tree = reader.next()) != null)
      {
        component.train(tree);
        if (++total%5000 == 0) LOG.info(".");
      }
     
      reader.close();
    }
View Full Code Here

Examples of com.clearnlp.nlp.train.AbstractNLPTrainer.train()

   
    try
    {
      Element eConfig = UTXml.getDocumentElement(new FileInputStream(configFile));
      JointFtrXml[] xmls = getFeatureTemplates(featureFiles);
      trainer.train(eConfig, xmls, trainFiles, modelDir);
    }
    catch (Exception e) {e.printStackTrace();}   
  }

  public AbstractNLPTrainer getTrainer(String mode)
View Full Code Here

Examples of com.github.neuralnetworks.training.DNNLayerTrainer.train()

  // execution mode
  Environment.getInstance().setExecutionMode(EXECUTION_MODE.SEQ);

  // layerwise pre-training
  deepTrainer.train();

  // fine tuning backpropagation
  BackPropagationTrainer<?> bpt = TrainerFactory.backPropagation(sae, trainInputProvider, testInputProvider, new MultipleNeuronsOutputError(), new NNRandomInitializer(new MersenneTwisterRandomInitializer(-0.01f, 0.01f)), 0.01f, 0.5f, 0f, 0f);

  // log data
View Full Code Here

Examples of com.github.neuralnetworks.training.DNNLayerTrainer.train()

  // deep trainer
  DNNLayerTrainer deepTrainer = TrainerFactory.dnnLayerTrainer(sae, map, trainInputProvider, testInputProvider, null);

  // layerwise pre-training
  deepTrainer.train();

  // fine tuning backpropagation
  BackPropagationTrainer<?> bpt = TrainerFactory.backPropagation(sae, trainInputProvider, testInputProvider, new MultipleNeuronsOutputError(), new NNRandomInitializer(new MersenneTwisterRandomInitializer(-0.01f, 0.01f), 0.5f), 0.02f, 0.7f, 0f, 0f, 0f, 150, 1, 2000);

  // log data
View Full Code Here

Examples of com.github.neuralnetworks.training.DNNLayerTrainer.train()

  Map<NeuralNetwork, OneStepTrainer<?>> layerTrainers = new HashMap<>();
  layerTrainers.put(firstRBM, firstTrainer);
  layerTrainers.put(secondRBM, secondTrainer);

  DNNLayerTrainer trainer = TrainerFactory.dnnLayerTrainer(dbn, layerTrainers, inputProvider, null, null);
  trainer.train();
 
  assertEquals(0.2 + 0.13203661, cg1.get(0, 0), 0.00001);
  assertEquals(0.4 - 0.22863509,  cg1.get(0, 1), 0.00001);
  assertEquals(-0.5 + 0.12887852, cg1.get(0, 2), 0.00001);
  assertEquals(-0.3 + 0.26158813, cg1.get(1, 0), 0.00001);
View Full Code Here

Examples of com.github.neuralnetworks.training.DNNLayerTrainer.train()

  Map<NeuralNetwork, OneStepTrainer<?>> layerTrainers = new HashMap<>();
  layerTrainers.put(firstRBM, firstTrainer);
  layerTrainers.put(secondRBM, secondTrainer);
 
  DNNLayerTrainer trainer = TrainerFactory.dnnLayerTrainer(dbn, layerTrainers, inputProvider, null, null);
  trainer.train();
 
  assertEquals(0.2 + 0.13203661, cg1.get(0, 0), 0.00001);
  assertEquals(0.4 - 0.22863509,  cg1.get(0, 1), 0.00001);
  assertEquals(-0.5 + 0.12887852, cg1.get(0, 2), 0.00001);
  assertEquals(-0.3 + 0.26158813, cg1.get(1, 0), 0.00001);
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.