Package com.compomics.util.math.roc
Class DistributionRoc
java.lang.Object
com.compomics.util.math.roc.DistributionRoc
- All Implemented Interfaces:
ROC
This class can be used to draw roc curves from experimental data.
- Author:
- Marc Vaudel
-
Constructor Summary
ConstructorsConstructorDescriptionEmpty default constructorDistributionRoc(Distribution distributionControl, Distribution distributionPatient) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetAuc()Returns an estimation of the area under the curve.doublegetSpecificityAt(double sensitivity) Returns the 1-specificity at a given sensitivity.doublegetValueAt(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.
-
Constructor Details
-
DistributionRoc
public DistributionRoc()Empty default constructor -
DistributionRoc
Constructor. The patient distribution should be higher (to the right) than the control distribution.- Parameters:
distributionControl- the control distributiondistributionPatient- the patient distribution
-
-
Method Details
-
getValueAt
public double getValueAt(double specificity) throws org.apache.commons.math.MathException Description copied from interface:ROCReturns 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:
getValueAtin interfaceROC- 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:ROCReturns the 1-specificity at a given sensitivity.- Specified by:
getSpecificityAtin interfaceROC- 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.MathExceptionDescription copied from interface:ROCReturns xy values to draw the curve.- Specified by:
getxYValuesin interfaceROC- 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.MathExceptionDescription copied from interface:ROCReturns an estimation of the area under the curve.
-