Environment for
DeveLoping
KDD-Applications
Supported by Index-Structures

de.lmu.ifi.dbs.elki.algorithm.statistics
Class EvaluateRankingQuality<V extends NumberVector<V,?>,D extends NumberDistance<D,?>>

java.lang.Object
  extended by de.lmu.ifi.dbs.elki.logging.AbstractLoggable
      extended by de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,R>
          extended by de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm<V,D,CollectionResult<DoubleVector>>
              extended by de.lmu.ifi.dbs.elki.algorithm.statistics.EvaluateRankingQuality<V,D>
Type Parameters:
V - Vector type
D - Distance type
All Implemented Interfaces:
Algorithm<V,CollectionResult<DoubleVector>>, Parameterizable

@Title(value="Evaluate Ranking Quality")
@Description(value="Evaluates the effectiveness of a distance function via the obtained rankings.")
public class EvaluateRankingQuality<V extends NumberVector<V,?>,D extends NumberDistance<D,?>>
extends DistanceBasedAlgorithm<V,D,CollectionResult<DoubleVector>>

Evaluate a distance function with respect to kNN queries. For each point, the neighbors are sorted by distance, then the ROC AUC is computed. A score of 1 means that the distance function provides a perfect ordering of relevant neighbors first, then irrelevant neighbors. A value of 0.5 can be obtained by random sorting. A value of 0 means the distance function is inverted, i.e. a similarity. TODO: Allow fixed binning range, configurable TODO: Add sampling

Author:
Erich Schubert

Field Summary
static OptionID HISTOGRAM_BINS_ID
          OptionID for HISTOGRAM_BINS_OPTION
private  IntParameter HISTOGRAM_BINS_OPTION
          Option to configure the number of bins to use.
(package private)  int numbins
          Number of bins to use.
 
Fields inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm
DISTANCE_FUNCTION_ID, DISTANCE_FUNCTION_PARAM
 
Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debug, logger
 
Constructor Summary
EvaluateRankingQuality(Parameterization config)
          Constructor, adhering to Parameterizable
 
Method Summary
protected  CollectionResult<DoubleVector> runInTime(Database<V> database)
          Run the algorithm.
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.DistanceBasedAlgorithm
getDistanceFactory, getDistanceFunction
 
Methods inherited from class de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm
isTime, isVerbose, run, setTime, setVerbose
 
Methods inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable
debugFine, debugFiner, debugFinest, exception, progress, verbose, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HISTOGRAM_BINS_ID

public static final OptionID HISTOGRAM_BINS_ID
OptionID for HISTOGRAM_BINS_OPTION


HISTOGRAM_BINS_OPTION

private final IntParameter HISTOGRAM_BINS_OPTION
Option to configure the number of bins to use.


numbins

int numbins
Number of bins to use.

Constructor Detail

EvaluateRankingQuality

public EvaluateRankingQuality(Parameterization config)
Constructor, adhering to Parameterizable

Parameters:
config - Parameterization
Method Detail

runInTime

protected CollectionResult<DoubleVector> runInTime(Database<V> database)
                                            throws IllegalStateException
Run the algorithm.

Specified by:
runInTime in class AbstractAlgorithm<V extends NumberVector<V,?>,CollectionResult<DoubleVector>>
Parameters:
database - the database to run the algorithm on
Returns:
the Result computed by this algorithm
Throws:
IllegalStateException - if the algorithm has not been initialized properly (e.g. the setParameters(String[]) method has been failed to be called).

Release 0.3 (2010-03-31_1612)