com.rapidminer.tools.math
Class ROCDataGenerator

java.lang.Object
  extended by com.rapidminer.tools.math.ROCDataGenerator
All Implemented Interfaces:
java.io.Serializable

public class ROCDataGenerator
extends java.lang.Object
implements java.io.Serializable

Helper class containing some methods for ROC plots, threshold finding and area under curve calculation.

Author:
Ingo Mierswa, Martin Scholz
See Also:
Serialized Form

Field Summary
static int MAX_ROC_POINTS
          Defines the maximum amount of points which is plotted in the ROC curve.
 
Constructor Summary
ROCDataGenerator(double misclassificationCostsPositive, double misclassificationCostsNegative)
          Creates a new ROC data generator.
 
Method Summary
 double calculateAUC(ROCData rocData)
          Calculates the area under the curve for a given list of ROC data points.
 ROCData createROCData(ExampleSet exampleSet, boolean useExampleWeights)
          Creates a list of ROC data points from the given example set.
 void createROCPlotDialog(ROCData data)
          Creates a dialog containing a plotter for a given list of ROC data points.
 void createROCPlotDialog(ROCData data, boolean showSlope, boolean showThresholds)
          Creates a dialog containing a plotter for a given list of ROC data points.
 double getBestThreshold()
          The best threshold will automatically be determined during the calculation of the ROC data list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_ROC_POINTS

public static final int MAX_ROC_POINTS
Defines the maximum amount of points which is plotted in the ROC curve.

See Also:
Constant Field Values
Constructor Detail

ROCDataGenerator

public ROCDataGenerator(double misclassificationCostsPositive,
                        double misclassificationCostsNegative)
Creates a new ROC data generator.

Method Detail

getBestThreshold

public double getBestThreshold()
The best threshold will automatically be determined during the calculation of the ROC data list. Please note that the given weights are taken into account (defining the slope.


createROCData

public ROCData createROCData(ExampleSet exampleSet,
                             boolean useExampleWeights)
Creates a list of ROC data points from the given example set. The example set must have a binary label attribute and confidence values for both values, i.e. a model must have been applied on the data.


createROCPlotDialog

public void createROCPlotDialog(ROCData data,
                                boolean showSlope,
                                boolean showThresholds)
Creates a dialog containing a plotter for a given list of ROC data points.


createROCPlotDialog

public void createROCPlotDialog(ROCData data)
Creates a dialog containing a plotter for a given list of ROC data points.


calculateAUC

public double calculateAUC(ROCData rocData)
Calculates the area under the curve for a given list of ROC data points.



Copyright © 2001-2009 by Rapid-I