@Test public void testAuc() { Auc auc = new Auc(); Random gen = RandomUtils.getRandom(); auc.setProbabilityScore(false); for (int i=0; i<100000; i++) { auc.add(0, gen.nextGaussian()); auc.add(1, gen.nextGaussian() + 1); } assertEquals(0.76, auc.auc(), 0.01); }
public Auc(double threshold) { confusion = new DenseMatrix(2, 2); entropy = new DenseMatrix(2, 2); this.rand = RandomUtils.getRandom(); this.threshold = threshold; }
Auc { public Auc(double threshold) { confusion = new DenseMatrix(2, 2); entropy = new DenseMatrix(2, 2); this.rand = RandomUtils.getRandom(); this.threshold = threshold; } }
Auc { public Auc(double threshold) { confusion = new DenseMatrix(2, 2); entropy = new DenseMatrix(2, 2); this.rand = RandomUtils.getRandom(); this.threshold = threshold; } Auc(double threshold);  Auc(); }
Auc { public Auc(double threshold) { confusion = new DenseMatrix(2, 2); entropy = new DenseMatrix(2, 2); this.rand = RandomUtils.getRandom(); this.threshold = threshold; } Auc(double threshold);  Auc(); void add(int trueValue, double score); void add(int trueValue, int predictedClass); double auc(); Matrix confusion(); Matrix entropy(); void setMaxBufferSize(int maxBufferSize); boolean isProbabilityScore(); void setProbabilityScore(boolean probabilityScore); }
Auc { public Auc(double threshold) { confusion = new DenseMatrix(2, 2); entropy = new DenseMatrix(2, 2); this.rand = RandomUtils.getRandom(); this.threshold = threshold; } Auc(double threshold);  Auc(); void add(int trueValue, double score); void add(int trueValue, int predictedClass); double auc(); Matrix confusion(); Matrix entropy(); void setMaxBufferSize(int maxBufferSize); boolean isProbabilityScore(); void setProbabilityScore(boolean probabilityScore);  }