javax.datamining.supervised.classification
Interface ReceiverOperatingCharacterics


public interface ReceiverOperatingCharacterics

ReceiverOperatingCharacteristics is a common interface to retrieve the result of receiver operating characteristic computation.

Originally used in signal detection theory to gauge the true hit versus false alarm ratio when sending signals over a noisy channel, the receiver operating characteristics (ROC) of a classifier measures its performance as a trade-off between selectivity and sensitivity. Like lift charts, ROC curves provide a means to compare individual models and determine threshold that result in a high ratio of positive hits.

Typically, an ROC is a curve of false alarm rate (false positives, on X-axis) versus hit rate (true positives, on Y-axis) is plotted with a varying sensitivity or threshold parameter. The curve connects two points (0,0) and (1,1). The point (0,0) is where the classifier always gets the negatives cases right but all positive cases wrong. The point (1,1) is where the classifier gets all positive cases right but all negative cases wrong.

The elements of ROC are the following:

Author:
JSR-73 Java Data Mining Expert Group

Method Summary
 double getAreaUnderCurve()
          Returns the area under the ROC curve.
 double getFalseAlarmRate(int index)
          Returns the false alarm rate of the area represented by the specified index.
 double getHitRate(int index)
          Returns the hit rate of the area represented by the specified index.
 long getNegatives(int index, boolean trueFalse)
          Returns true/false negatives of the area represented by the specified index.
 int getNumberOfThresholdCandidates()
          Returns the number of threshold candidates.
 long getPositives(int index, boolean trueFalse)
          Returns true/false positives of the area represented by the specified index.
 double getProbabilityThreshold(int index)
          Returns the probability threshold of the area represented by the specified index.
 

Method Detail

getAreaUnderCurve

public double getAreaUnderCurve()
Returns the area under the ROC curve. The area under the ROC curve is useful as a quantitative measure for the overall performance of models over the entire evaludation dataset. This area ranges between 0 and 1, and an ideal classifier has an area of 1. It represents the probability of the model to correctly rank a randomly chosen pair of rows of opposite classes. If the user wants to use a subset of the evaluation data, the ROC curves also helps in determining a model that will provide the best results at a specific threshold.

Returns:
double

getFalseAlarmRate

public double getFalseAlarmRate(int index)
                         throws JDMException
Returns the false alarm rate of the area represented by the specified index. The index must be between 0 and n-1 where n is the number of threshold candidates.

Parameters:
index -
Returns:
double
Throws:
JDMException

getHitRate

public double getHitRate(int index)
                  throws JDMException
Returns the hit rate of the area represented by the specified index. The index must be between 0 and n-1 where n is the number of threshold candidates.

Parameters:
index -
Returns:
double
Throws:
JDMException

getNegatives

public long getNegatives(int index,
                         boolean trueFalse)
                  throws JDMException
Returns true/false negatives of the area represented by the specified index. The index must be between 0 and n-1 where n is the number of threshold candidates.

Parameters:
index -
trueFalse -
Returns:
long
Throws:
JDMException

getNumberOfThresholdCandidates

public int getNumberOfThresholdCandidates()
Returns the number of threshold candidates. This number can be used as index for other methods.

Returns:
int

getPositives

public long getPositives(int index,
                         boolean trueFalse)
                  throws JDMException
Returns true/false positives of the area represented by the specified index. The index must be between 0 and n-1 where n is the number of threshold candidates.

Parameters:
index -
trueFalse -
Returns:
long
Throws:
JDMException

getProbabilityThreshold

public double getProbabilityThreshold(int index)
                               throws JDMException
Returns the probability threshold of the area represented by the specified index. The index must be between 0 and n-1 where n is the number of threshold candidates.

Parameters:
index -
Returns:
double
Throws:
JDMException