Exemplo n.º 1
0
  @Test
  public void testTransformR() {
    System.out.println("transformR");
    Random rand = new Random(13);
    int t0 = 1, t1 = 5, t2 = 8;
    Set<Integer> shouldHave = new HashSet<Integer>();
    shouldHave.addAll(Arrays.asList(t0, t1, t2));

    RegressionDataSet rds = SFSTest.generate3DimIn10R(rand, t0, t1, t2);

    BDS bds = new BDS(3, rds, new MultipleLinearRegression(), 5);
    Set<Integer> found = bds.getSelectedNumerical();

    assertEquals(shouldHave.size(), found.size());
    assertTrue(shouldHave.containsAll(found));
  }
Exemplo n.º 2
0
  /** Test of transform method, of class BDS. */
  @Test
  public void testTransformC() {
    System.out.println("transformC");
    Random rand = new Random(13);
    int t0 = 1, t1 = 5, t2 = 8;
    Set<Integer> shouldHave = new HashSet<Integer>();
    shouldHave.addAll(Arrays.asList(t0, t1, t2));

    ClassificationDataSet cds = SFSTest.generate3DimIn10(rand, t0, t1, t2);

    BDS bds = new BDS(3, cds, new NearestNeighbour(7), 5);
    Set<Integer> found = bds.getSelectedNumerical();

    assertEquals(shouldHave.size(), found.size());
    assertTrue(shouldHave.containsAll(found));
  }