|
|
|||||||||||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||||||||||||
java.lang.Objectde.lmu.ifi.dbs.elki.logging.AbstractLoggable
de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable
de.lmu.ifi.dbs.elki.algorithm.AbstractAlgorithm<O,MultiResult>
de.lmu.ifi.dbs.elki.evaluation.ComputeROCCurve<O>
O - Database object typepublic class ComputeROCCurve<O extends DatabaseObject>
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.
| Field Summary | |
|---|---|
private Algorithm<O,Result> |
algorithm
Holds the algorithm to run. |
private ClassParameter<Algorithm<O,Result>> |
ALGORITHM_PARAM
Parameter to specify the algorithm to be applied, must extend Algorithm. |
private String |
positive_class_name
Stores the "positive" class. |
static OptionID |
POSITIVE_CLASS_NAME_ID
OptionID for POSITIVE_CLASS_NAME_PARAM |
private PatternParameter |
POSITIVE_CLASS_NAME_PARAM
The distance function to determine the reachability distance between database objects. |
private MultiResult |
result
Stores the result object. |
static AssociationID<Double> |
ROC_AUC
The association id to associate the ROC Area-under-Curve. |
| Fields inherited from class de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizable |
|---|
optionHandler |
| Fields inherited from class de.lmu.ifi.dbs.elki.logging.AbstractLoggable |
|---|
debug, logger |
| Constructor Summary | |
|---|---|
ComputeROCCurve()
|
|
| Method Summary | |
|---|---|
Description |
getDescription()
Returns a description of the algorithm. |
private Iterator<Integer> |
getIterableResult(Database<O> database,
Result result)
Find an "iterable" result that looks like object IDs. |
private Cluster<Model> |
getReferenceCluster(Database<O> database,
String class_name)
Find the "positive" reference cluster using a by label clustering. |
MultiResult |
getResult()
Returns the result of the algorithm. |
protected MultiResult |
runInTime(Database<O> database)
The run method encapsulated in measure of runtime. |
List<String> |
setParameters(List<String> args)
Calls the super method and sets additionally the values of the flags AbstractAlgorithm.VERBOSE_FLAG and AbstractAlgorithm.TIME_FLAG. |
| 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.utilities.optionhandling.AbstractParameterizable |
|---|
addOption, addParameterizable, addParameterizable, checkGlobalParameterConstraints, collectOptions, getAttributeSettings, getParameters, rememberParametersExcept, removeOption, removeParameterizable, shortDescription |
| 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 |
| Methods inherited from interface de.lmu.ifi.dbs.elki.utilities.optionhandling.Parameterizable |
|---|
checkGlobalParameterConstraints, collectOptions, getParameters, shortDescription |
| Field Detail |
|---|
public static final OptionID POSITIVE_CLASS_NAME_ID
POSITIVE_CLASS_NAME_PARAM
private final PatternParameter POSITIVE_CLASS_NAME_PARAM
Default value: EuclideanDistanceFunction
Key: -rocauc.positive
private final ClassParameter<Algorithm<O extends DatabaseObject,Result>> ALGORITHM_PARAM
Algorithm.
Key: -algorithm
private String positive_class_name
private Algorithm<O extends DatabaseObject,Result> algorithm
public static final AssociationID<Double> ROC_AUC
private MultiResult result
| Constructor Detail |
|---|
public ComputeROCCurve()
| Method Detail |
|---|
protected MultiResult runInTime(Database<O> database)
throws IllegalStateException
AbstractAlgorithm
runInTime in class AbstractAlgorithm<O extends DatabaseObject,MultiResult>database - the database to run the algorithm on
IllegalStateException - if the algorithm has not been initialized
properly (e.g. the setParameters(String[]) method has been failed
to be called).
private Cluster<Model> getReferenceCluster(Database<O> database,
String class_name)
database - Database to search inclass_name - Cluster name
private Iterator<Integer> getIterableResult(Database<O> database,
Result result)
database - Database contextresult - Result object
public Description getDescription()
Algorithm
public MultiResult getResult()
Algorithm
public List<String> setParameters(List<String> args)
throws ParameterException
AbstractAlgorithmAbstractAlgorithm.VERBOSE_FLAG and AbstractAlgorithm.TIME_FLAG.
setParameters in interface ParameterizablesetParameters in class AbstractAlgorithm<O extends DatabaseObject,MultiResult>args - parameters to set the attributes accordingly to
ParameterException - in case of wrong parameter-setting
|
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||