de.lmu.ifi.dbs.elki.evaluation.roc
Class ComputeROCCurve

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.evaluation.roc.ComputeROCCurve
All Implemented Interfaces:
Evaluator, ResultProcessor

public class ComputeROCCurve
extends Object
implements Evaluator

Compute a ROC curve to evaluate a ranking algorithm and compute the corresponding ROCAUC value. The parameter -rocauc.positive specifies the class label of "positive" hits. The nested algorithm -algorithm will be run, the result will be searched for an iterable or ordering result, which then is compared with the clustering obtained via the given class label.


Nested Class Summary
static class ComputeROCCurve.Parameterizer
          Parameterization class.
static class ComputeROCCurve.ROCResult
          Result object for ROC curves.
 
Field Summary
(package private) static Logging logger
          The logger.
static OptionID POSITIVE_CLASS_NAME_ID
          The pattern to identify positive classes.
private  Pattern positiveClassName
          Stores the "positive" class.
static String ROCAUC_LABEL
          The label we use for marking ROCAUC values.
 
Constructor Summary
ComputeROCCurve(Pattern positive_class_name)
          Constructor.
 
Method Summary
private  ComputeROCCurve.ROCResult computeROCResult(int size, SetDBIDs positiveids, Iterator<DBID> iter)
           
private  ComputeROCCurve.ROCResult computeROCResult(int size, SetDBIDs positiveids, OutlierResult or)
           
private  Iterator<DBID> getDBIDIterator(IterableResult<?> ir)
          Wrap the uncheckable cast with the manual check.
 void processNewResult(HierarchicalResult baseResult, Result result)
          Process a result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROCAUC_LABEL

public static final String ROCAUC_LABEL
The label we use for marking ROCAUC values.

See Also:
Constant Field Values

logger

static final Logging logger
The logger.


POSITIVE_CLASS_NAME_ID

public static final OptionID POSITIVE_CLASS_NAME_ID
The pattern to identify positive classes.

Key: -rocauc.positive


positiveClassName

private Pattern positiveClassName
Stores the "positive" class.

Constructor Detail

ComputeROCCurve

public ComputeROCCurve(Pattern positive_class_name)
Constructor.

Parameters:
positive_class_name - Positive class name pattern
Method Detail

computeROCResult

private ComputeROCCurve.ROCResult computeROCResult(int size,
                                                   SetDBIDs positiveids,
                                                   Iterator<DBID> iter)

computeROCResult

private ComputeROCCurve.ROCResult computeROCResult(int size,
                                                   SetDBIDs positiveids,
                                                   OutlierResult or)

getDBIDIterator

private Iterator<DBID> getDBIDIterator(IterableResult<?> ir)
Wrap the uncheckable cast with the manual check.

Parameters:
ir - Interable result
Returns:
Iterator if Integer iterable, null otherwise.

processNewResult

public void processNewResult(HierarchicalResult baseResult,
                             Result result)
Description copied from interface: ResultProcessor
Process a result.

Specified by:
processNewResult in interface ResultProcessor
Parameters:
baseResult - The base of the result tree.
result - Newly added result subtree.

Release 0.4.0 (2011-09-20_1324)