Class RocCurve

    • Constructor Detail

      • RocCurve

        public RocCurve​(double[] threshold,
                        double[] fpr,
                        double[] tpr)
    • Method Detail

      • numPoints

        public int numPoints()
        Specified by:
        numPoints in class BaseCurve
        Returns:
        The number of points in the curve
      • getX

        public double[] getX()
        Specified by:
        getX in class BaseCurve
        Returns:
        X axis values
      • getY

        public double[] getY()
        Specified by:
        getY in class BaseCurve
        Returns:
        Y-axis values
      • 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