Package aima.core.learning.framework

Examples of aima.core.learning.framework.Example


  @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());
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());
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());
View Full Code Here

TOP

Related Classes of aima.core.learning.framework.Example

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.