Package edu.cmu.tetrad.util
Class RocCalculator
java.lang.Object
edu.cmu.tetrad.util.RocCalculator
Calculates a ROC curve and AUC (area under curve) for a list of scored cases
 whose inclusion in category C is known.
- Author:
- Joseph Ramsey and Frank Wimberly
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionRocCalculator(double[] scores, boolean[] inCategory, int direction) Constructs a calculator using the parameter information below.
- 
Method SummaryModifier and TypeMethodDescriptiondoublegetAuc()Calculates the area under the ROC curve using a very clever Ramsey idea.double[][]
- 
Field Details- 
ASCENDINGpublic static final int ASCENDING- See Also:
 
 
- 
- 
Constructor Details- 
RocCalculatorpublic RocCalculator(double[] scores, boolean[] inCategory, int direction) Constructs a calculator using the parameter information below.- Parameters:
- scores- The scores to be plotted.
- inCategory- Whether each score is in the category in question or not. Must be an array of the same length as scores.
- direction- Either RocCalculator.ASCENDING or RocCalculator.DESCENDING.
 
 
- 
- 
Method Details- 
getAucpublic double getAuc()Calculates the area under the ROC curve using a very clever Ramsey idea.- Returns:
- the area under the ROC curve (AUC).
 
- 
getScaledRocPlotpublic double[][] getScaledRocPlot()
 
-