Package org.nd4j.evaluation.curves
Class RocCurve
- java.lang.Object
-
- org.nd4j.evaluation.curves.BaseCurve
-
- org.nd4j.evaluation.curves.RocCurve
-
public class RocCurve extends BaseCurve
-
-
Field Summary
-
Fields inherited from class org.nd4j.evaluation.curves.BaseCurve
DEFAULT_FORMAT_PREC
-
-
Constructor Summary
Constructors Constructor Description RocCurve(double[] threshold, double[] fpr, double[] tpr)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecalculateAUC()Calculate and return the area under ROC curvestatic RocCurvefromJson(String json)static RocCurvefromYaml(String yaml)doublegetFalsePositiveRate(int i)doublegetThreshold(int i)StringgetTitle()doublegetTruePositiveRate(int i)double[]getX()double[]getY()intnumPoints()-
Methods inherited from class org.nd4j.evaluation.curves.BaseCurve
calculateArea, calculateArea, format, fromJson, fromYaml, toJson, toYaml
-
-
-
-
Method Detail
-
numPoints
public int numPoints()
-
getTitle
public String getTitle()
-
getThreshold
public double getThreshold(int i)
- Parameters:
i- Point number, 0 to numPoints()-1 inclusive- Returns:
- Threshold of a given point
-
getTruePositiveRate
public double getTruePositiveRate(int i)
- Parameters:
i- Point number, 0 to numPoints()-1 inclusive- Returns:
- True positive rate of a given point
-
getFalsePositiveRate
public double getFalsePositiveRate(int i)
- Parameters:
i- Point number, 0 to numPoints()-1 inclusive- Returns:
- False positive rate of a given point
-
calculateAUC
public double calculateAUC()
Calculate and return the area under ROC curve
-
-