コード例 #1
0
  public void testEstimateWNoValues() throws Exception {
    double[] y = new double[] {};

    double sigma = 30;
    double[] initialW = new double[] {Math.log(.5), Math.log(.5)};

    assertEquals(1, scorer.estimate(y, initialW, 200, sigma, new double[y.length]).w0, 0.0001);
  }
コード例 #2
0
  @Test
  public void testEstimateW() throws Exception {
    double[] y = HET_DEL_5X_5N;

    double sigma = 30;
    double[] initialW = new double[] {Math.log(.5), Math.log(.5)};

    assertEquals(.5, scorer.estimate(y, initialW, 200, sigma, new double[y.length]).w0, 0.0001);
  }