Package org.encog.ml.data

Examples of org.encog.ml.data.MLDataSet


 
  @Test
  public void testRPROP() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain rprop = new ResilientPropagation(network, trainingData);
    NetworkUtil.testTraining(rprop,0.03);
  }
View Full Code Here


  }
 
  @Test
  public void testLMA() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain rprop = new LevenbergMarquardtTraining(network, trainingData);
    NetworkUtil.testTraining(rprop,0.03);
  }
View Full Code Here

  }
 
  @Test
  public void testBPROP() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();

    MLTrain bprop = new Backpropagation(network, trainingData, 0.7, 0.9);
    NetworkUtil.testTraining(bprop,0.01);
View Full Code Here

  }
 
  @Test
  public void testManhattan() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain bprop = new ManhattanPropagation(network, trainingData, 0.01);
    NetworkUtil.testTraining(bprop,0.01);
  }
View Full Code Here

  }
 
  @Test
  public void testSCG() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    MLTrain bprop = new ScaledConjugateGradient(network, trainingData);
    NetworkUtil.testTraining(bprop,0.04);
  }
View Full Code Here

  }
 
  @Test
  public void testAnneal() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    CalculateScore score = new TrainingSetScore(trainingData);
    NeuralSimulatedAnnealing anneal = new NeuralSimulatedAnnealing(network,score,10,2,100);
    NetworkUtil.testTraining(anneal,0.01);
  }
View Full Code Here

  }
 
  @Test
  public void testGenetic() throws Throwable
  {
    MLDataSet trainingData = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);   
    BasicNetwork network = NetworkUtil.createXORNetworkUntrained();
    CalculateScore score = new TrainingSetScore(trainingData);
    NeuralGeneticAlgorithm genetic = new NeuralGeneticAlgorithm(network, new RangeRandomizer(-1,1), score, 500,0.1,0.25);
    NetworkUtil.testTraining(genetic,0.00001);
  }
View Full Code Here

    ElmanPattern elmanPattern = new ElmanPattern();
    elmanPattern.setInputNeurons(input);
    elmanPattern.addHiddenLayer(hidden);
    elmanPattern.setOutputNeurons(ideal);
    BasicNetwork network = (BasicNetwork)elmanPattern.generate();
    MLDataSet training = RandomTrainingFactory.generate(1000, 5, network.getInputCount(), network.getOutputCount(), -1, 1);
    ResilientPropagation prop = new ResilientPropagation(network,training);
    prop.iteration();
    prop.iteration();   
  }
View Full Code Here

    JordanPattern jordanPattern = new JordanPattern();
    jordanPattern.setInputNeurons(input);
    jordanPattern.addHiddenLayer(hidden);
    jordanPattern.setOutputNeurons(ideal);
    BasicNetwork network = (BasicNetwork)jordanPattern.generate();
    MLDataSet training = RandomTrainingFactory.generate(1000, 5, network.getInputCount(), network.getOutputCount(), -1, 1);
    ResilientPropagation prop = new ResilientPropagation(network,training);
    prop.iteration();
    prop.iteration();   
  }
View Full Code Here

    pattern.setInputNeurons(2);
    pattern.setOutputNeurons(1);
    BasicNetwork network = (BasicNetwork)pattern.generate();
   
    // train it
    MLDataSet training = new BasicMLDataSet(XOR.XOR_INPUT,XOR.XOR_IDEAL);
    MLTrain train = new TrainAdaline(network,training,0.01);
    NetworkUtil.testTraining(train,0.01);
  }
View Full Code Here

TOP

Related Classes of org.encog.ml.data.MLDataSet

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.