Examples of train()


Examples of com.github.neuralnetworks.training.rbm.AparapiCDTrainer.train()

  AparapiCDTrainer t = TrainerFactory.cdSigmoidTrainer(rbm, trainInputProvider, testInputProvider,  new MultipleNeuronsOutputError(), new NNRandomInitializer(new MersenneTwisterRandomInitializer(-0.01f, 0.01f)), 0.01f, 0.5f, 0f, 0f, 1, false);

  t.addEventListener(new LogTrainingListener(Thread.currentThread().getStackTrace()[1].getMethodName(), false, true));
  Environment.getInstance().setExecutionMode(EXECUTION_MODE.CPU);
  t.train();
  t.test();

  assertEquals(0, t.getOutputError().getTotalNetworkError(), 0.1);
    }
View Full Code Here

Examples of com.github.neuralnetworks.training.rbm.AparapiCDTrainer.train()

  // log data
  t.addEventListener(new LogTrainingListener(Thread.currentThread().getStackTrace()[1].getMethodName()));

  // training
  t.train();

  // training
  t.test();

  // 2 of the iris classes are linearly not separable - an error of 2/3 illustrates that
View Full Code Here

Examples of com.github.neuralnetworks.training.rbm.AparapiCDTrainer.train()

  // log data
  t.addEventListener(new LogTrainingListener(Thread.currentThread().getStackTrace()[1].getMethodName(), true, false));

  // training
  t.train();

  // testing
  t.test();

  assertEquals(0, t.getOutputError().getTotalNetworkError(), 0);
View Full Code Here

Examples of com.github.neuralnetworks.training.rbm.AparapiCDTrainer.train()

  // log data
  t.addEventListener(new LogTrainingListener(Thread.currentThread().getStackTrace()[1].getMethodName(), true, false));

  // training
  t.train();

  // testing
  t.test();
 
  assertEquals(0, t.getOutputError().getTotalNetworkError(), 0);
View Full Code Here

Examples of com.github.neuralnetworks.training.rbm.AparapiCDTrainer.train()

  cgb2.set(-0.4f, 0, 0);
  cgb2.set(0.2f, 1, 0);

  AparapiCDTrainer t = TrainerFactory.cdSigmoidTrainer(rbm, new SimpleInputProvider(new float[][] { { 1, 0, 1 } }, null), null, null, null, 1f, 0f, 0f, 0f, 1, 1, 1, true);

  t.train();

  assertEquals(0.52276707, cgb1.get(0, 0), 0.00001);
  assertEquals(- 0.54617375, cgb1.get(1, 0), 0.00001);
  assertEquals(0.51522285, cgb1.get(2, 0), 0.00001);
 
View Full Code Here

Examples of com.github.neuralnetworks.training.rbm.AparapiCDTrainer.train()

  cgb2.set(-0.4f, 0, 0);
  cgb2.set(0.2f, 1, 0);

  AparapiCDTrainer t = TrainerFactory.cdSigmoidTrainer(rbm, new SimpleInputProvider(new float[][] { { 1, 0, 1 }, { 1, 1, 0 } }, null), null, null, null, 1f, 0f, 0f, 0f, 1, 1, 1, false);

  t.train();

  assertEquals(0.86090606, cgb1.get(0, 0), 0.00001);
  assertEquals(0.089616358, cgb1.get(1, 0), 0.00001);
  assertEquals(-0.11872697, cgb1.get(2, 0), 0.00001);
View Full Code Here

Examples of com.github.neuralnetworks.training.rbm.DBNTrainer.train()

  DBNTrainer deepTrainer = TrainerFactory.dbnTrainer(dbn, map, trainInputProvider, null, null);

  Environment.getInstance().setExecutionMode(EXECUTION_MODE.SEQ);

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

  // fine tuning backpropagation
  BackPropagationTrainer<?> bpt = TrainerFactory.backPropagation(dbn, 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.rbm.DBNTrainer.train()

  DBNTrainer deepTrainer = TrainerFactory.dbnTrainer(dbn, map, trainInputProvider, null, null);

  Environment.getInstance().setExecutionMode(EXECUTION_MODE.SEQ);

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

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

  // log data
View Full Code Here

Examples of com.jgaap.classifiers.NearestNeighborDriver.train()

   
    Document unknownDocument = new Document();
    unknownDocument.addEventSet(null, unknown);

    System.out.println("There once was a lass from Nantucket");
    nearest.train(knowns);
    List<Pair<String, Double>> t = nearest.analyze(unknownDocument);
    String r = t.get(0).getFirst();

    String s = "Mary";
View Full Code Here

Examples of com.jgaap.generics.AnalysisDriver.train()

   
    Document unknownDocument = new Document();
    unknownDocument.addEventSet(null, unknown);
   
    AnalysisDriver analysisDriver = new MahalanobisDistance();
    analysisDriver.train(knowns);
    List<Pair<String, Double>> t = analysisDriver.analyze(unknownDocument);
    for(Pair<String, Double> element : t){
      System.out.println(element.toString());
    }
    String r = t.get(0).getFirst();
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.