Class DataRoc

java.lang.Object
com.compomics.util.math.roc.DataRoc
All Implemented Interfaces:
ROC

public class DataRoc extends Object implements ROC
This class can be used to draw roc curves from experimental data.
Author:
Marc Vauel
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Enum listing the possible ways of interpolating points on the ROC.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Empty default constructor
    DataRoc(ArrayList<Double> controlValues, ArrayList<Double> patientValues, DataRoc.RocInterpolation rocInterpolation)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns an estimation of the area under the curve.
    double
    getSpecificityAt(double sensitivity)
    Returns the 1-specificity at a given sensitivity.
    double
    getValueAt(double specificity)
    Returns the sensitivity at a given 1-specificity, i.e., 1-type 2 error, the number of true healthy for a given type 1 error, the number of false healthy.
    double[][]
    Returns xy values to draw the curve.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DataRoc

      public DataRoc()
      Empty default constructor
    • DataRoc

      public DataRoc(ArrayList<Double> controlValues, ArrayList<Double> patientValues, DataRoc.RocInterpolation rocInterpolation)
      Constructor.
      Parameters:
      controlValues - the control values
      patientValues - the patient values
      rocInterpolation - the method to use to interpolate between points
  • Method Details

    • getValueAt

      public double getValueAt(double specificity) throws org.apache.commons.math.MathException
      Description copied from interface: ROC
      Returns the sensitivity at a given 1-specificity, i.e., 1-type 2 error, the number of true healthy for a given type 1 error, the number of false healthy.
      Specified by:
      getValueAt in interface ROC
      Parameters:
      specificity - the specificity (0.1 is 10%)
      Returns:
      the sensitivity at the given specificity (0.1 is 10%)
      Throws:
      org.apache.commons.math.MathException - if a MathException occurs
    • getSpecificityAt

      public double getSpecificityAt(double sensitivity) throws org.apache.commons.math.MathException
      Description copied from interface: ROC
      Returns the 1-specificity at a given sensitivity.
      Specified by:
      getSpecificityAt in interface ROC
      Parameters:
      sensitivity - the sensitivity (0.1 is 10%)
      Returns:
      the corresponding 1-specificity (0.1 is 10%)
      Throws:
      org.apache.commons.math.MathException - if a MathException occurs
    • getxYValues

      public double[][] getxYValues() throws org.apache.commons.math.MathException
      Description copied from interface: ROC
      Returns xy values to draw the curve.
      Specified by:
      getxYValues in interface ROC
      Returns:
      xy values to draw the curve
      Throws:
      org.apache.commons.math.MathException - if a MathException occurs
    • getAuc

      public double getAuc() throws org.apache.commons.math.MathException
      Description copied from interface: ROC
      Returns an estimation of the area under the curve.
      Specified by:
      getAuc in interface ROC
      Returns:
      an estimation of the area under the curve
      Throws:
      org.apache.commons.math.MathException - if a MathException occurs