dice.util
Class AUCCalculator

java.lang.Object
  extended by dice.util.AUCCalculator

public class AUCCalculator
extends java.lang.Object

A class for Area Under Curve calculation. The usage of that class can be found in BinaryClassification, and BinaryClassificationByCV.


Field Summary
private  double[] scores
          Predicted scores array.
private  boolean[] truths
          Truth array.
 
Constructor Summary
AUCCalculator()
           
 
Method Summary
 double auc()
          Calculate AUC.
 void setLabels(boolean[] truths)
          Set the truth array.
 void setScores(double[] scores)
          Set the predicted socres array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

truths

private boolean[] truths
Truth array.


scores

private double[] scores
Predicted scores array.

Constructor Detail

AUCCalculator

public AUCCalculator()
Method Detail

setLabels

public void setLabels(boolean[] truths)
Set the truth array.

Parameters:
truths -

setScores

public void setScores(double[] scores)
Set the predicted socres array.

Parameters:
scores -

auc

public double auc()
Calculate AUC.

Returns:
AUC.