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 double
calculateAUC()
Calculate and return the area under ROC curvestatic RocCurve
fromJson(String json)
static RocCurve
fromYaml(String yaml)
double
getFalsePositiveRate(int i)
double
getThreshold(int i)
String
getTitle()
double
getTruePositiveRate(int i)
double[]
getX()
double[]
getY()
int
numPoints()
-
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
-
-