Package aima.core.learning.neural

Examples of aima.core.learning.neural.IrisDataSetNumerizer


      System.out.println(Util.ntimes("*", 100));
      System.out
          .println("\n Perceptron Demo - Running Perceptron on Iris data Set with 10 epochs of learning ");
      System.out.println(Util.ntimes("*", 100));
      DataSet irisDataSet = DataSetFactory.getIrisDataSet();
      Numerizer numerizer = new IrisDataSetNumerizer();
      NNDataSet innds = new IrisNNDataSet();

      innds.createExamplesFromDataSet(irisDataSet, numerizer);

      Perceptron perc = new Perceptron(3, 4);
View Full Code Here


      System.out
          .println("\n BackpropagationDemo  - Running BackProp on Iris data Set with 10 epochs of learning ");
      System.out.println(Util.ntimes("*", 100));

      DataSet irisDataSet = DataSetFactory.getIrisDataSet();
      Numerizer numerizer = new IrisDataSetNumerizer();
      NNDataSet innds = new IrisNNDataSet();

      innds.createExamplesFromDataSet(irisDataSet, numerizer);

      NNConfig config = new NNConfig();
View Full Code Here

  }

  @Test
  public void testDataSetPopulation() throws Exception {
    DataSet irisDataSet = DataSetFactory.getIrisDataSet();
    Numerizer numerizer = new IrisDataSetNumerizer();
    NNDataSet innds = new IrisNNDataSet();

    innds.createExamplesFromDataSet(irisDataSet, numerizer);

    NNConfig config = new NNConfig();
View Full Code Here

  }

  @Test
  public void testPerceptron() throws Exception {
    DataSet irisDataSet = DataSetFactory.getIrisDataSet();
    Numerizer numerizer = new IrisDataSetNumerizer();
    NNDataSet innds = new IrisNNDataSet();

    innds.createExamplesFromDataSet(irisDataSet, numerizer);

    Perceptron perc = new Perceptron(3, 4);
View Full Code Here

  @Test
  public void testNumerizesAndDeNumerizesIrisDataSetExample1()
      throws Exception {
    DataSet ds = DataSetFactory.getIrisDataSet();
    Example first = ds.getExample(0);
    Numerizer n = new IrisDataSetNumerizer();
    Pair<List<Double>, List<Double>> io = n.numerize(first);

    Assert.assertEquals(Arrays.asList(5.1, 3.5, 1.4, 0.2), io.getFirst());
    Assert.assertEquals(Arrays.asList(0.0, 0.0, 1.0), io.getSecond());

    String plant_category = n.denumerize(Arrays.asList(0.0, 0.0, 1.0));
    Assert.assertEquals("setosa", plant_category);
  }
View Full Code Here

  @Test
  public void testNumerizesAndDeNumerizesIrisDataSetExample2()
      throws Exception {
    DataSet ds = DataSetFactory.getIrisDataSet();
    Example first = ds.getExample(51);
    Numerizer n = new IrisDataSetNumerizer();
    Pair<List<Double>, List<Double>> io = n.numerize(first);

    Assert.assertEquals(Arrays.asList(6.4, 3.2, 4.5, 1.5), io.getFirst());
    Assert.assertEquals(Arrays.asList(0.0, 1.0, 0.0), io.getSecond());

    String plant_category = n.denumerize(Arrays.asList(0.0, 1.0, 0.0));
    Assert.assertEquals("versicolor", plant_category);
  }
View Full Code Here

  @Test
  public void testNumerizesAndDeNumerizesIrisDataSetExample3()
      throws Exception {
    DataSet ds = DataSetFactory.getIrisDataSet();
    Example first = ds.getExample(100);
    Numerizer n = new IrisDataSetNumerizer();
    Pair<List<Double>, List<Double>> io = n.numerize(first);

    Assert.assertEquals(Arrays.asList(6.3, 3.3, 6.0, 2.5), io.getFirst());
    Assert.assertEquals(Arrays.asList(1.0, 0.0, 0.0), io.getSecond());

    String plant_category = n.denumerize(Arrays.asList(1.0, 0.0, 0.0));
    Assert.assertEquals("virginica", plant_category);
  }
View Full Code Here

TOP

Related Classes of aima.core.learning.neural.IrisDataSetNumerizer

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.