Examples of auc()


Examples of org.apache.mahout.math.stats.GlobalOnlineAuc.auc()

      auc3.addSample(0, gen.nextGaussian());
      auc3.addSample(1, gen.nextGaussian() + 1);
    }

    assertEquals(auc1.auc(), auc3.auc(), 0.01);
  }

  @Test
  public void onlineLogisticRegressionRoundTrip() throws IOException {
    OnlineLogisticRegression olr = new OnlineLogisticRegression(2, 5, new L1());
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

      int target = Integer.parseInt(pieces[1]);
      x1.add(target, score);
      x2.addSample(target, score);
      if (lineCount%500 == 0) {
        System.out.printf("%10d\t%10.3f\t%10d\t%.3f\n",
                   lineCount, score, target, x2.auc());
      }
      line = in.readLine();
    }

    System.out.printf("%d lines read\n", lineCount);
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

      line = in.readLine();
    }

    System.out.printf("%d lines read\n", lineCount);
    System.out.printf("%10.2f = batch estimate\n", x1.auc());
    System.out.printf("%10.2f = on-line estimate\n", x2.auc())
    }
}
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

    Random gen = RandomUtils.getRandom();
    for (int i = 0; i < 10000; i++) {
      auc1.addSample(0, gen.nextGaussian());
      auc1.addSample(1, gen.nextGaussian() + 1);
    }
    assertEquals(0.76, auc1.auc(), 0.01);

    Gson gson = ModelSerializer.gson();
    String s = gson.toJson(auc1);

    OnlineAuc auc2 = gson.fromJson(s, GlobalOnlineAuc.class);
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

    Gson gson = ModelSerializer.gson();
    String s = gson.toJson(auc1);

    OnlineAuc auc2 = gson.fromJson(s, GlobalOnlineAuc.class);

    assertEquals(auc1.auc(), auc2.auc(), 0);

    for (int i = 0; i < 1000; i++) {
      auc1.addSample(0, gen.nextGaussian());
      auc1.addSample(1, gen.nextGaussian() + 1);
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

      auc2.addSample(0, gen.nextGaussian());
      auc2.addSample(1, gen.nextGaussian() + 1);
    }

    assertEquals(auc1.auc(), auc2.auc(), 0.01);

    Foo x = new Foo();
    x.foo = auc1;
    x.pig = 3.13;
    x.dog = 42;
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

    Random gen = RandomUtils.getRandom();
    for (int i = 0; i < 10000; i++) {
      auc1.addSample(0, gen.nextGaussian());
      auc1.addSample(1, gen.nextGaussian() + 1);
    }
    assertEquals(0.76, auc1.auc(), 0.01);

    OnlineAuc auc3 = roundTrip(auc1, OnlineAuc.class);

    assertEquals(auc1.auc(), auc3.auc(), 0);
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

    }
    assertEquals(0.76, auc1.auc(), 0.01);

    OnlineAuc auc3 = roundTrip(auc1, OnlineAuc.class);

    assertEquals(auc1.auc(), auc3.auc(), 0);

    for (int i = 0; i < 1000; i++) {
      auc1.addSample(0, gen.nextGaussian());
      auc1.addSample(1, gen.nextGaussian() + 1);
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

      auc3.addSample(0, gen.nextGaussian());
      auc3.addSample(1, gen.nextGaussian() + 1);
    }

    assertEquals(auc1.auc(), auc3.auc(), 0.01);
  }

  @Test
  public void onlineLogisticRegressionRoundTrip() throws IOException {
    OnlineLogisticRegression olr = new OnlineLogisticRegression(2, 5, new L1());
View Full Code Here

Examples of org.apache.mahout.math.stats.OnlineAuc.auc()

    Random gen = RandomUtils.getRandom();
    for (int i = 0; i < 10000; i++) {
      auc1.addSample(0, gen.nextGaussian());
      auc1.addSample(1, gen.nextGaussian() + 1);
    }
    assertEquals(0.76, auc1.auc(), 0.01);

    OnlineAuc auc3 = roundTrip(auc1, OnlineAuc.class);

    assertEquals(auc1.auc(), auc3.auc(), 0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.