Package elki.algorithm.statistics
Class RankingQualityHistogram<O>
- java.lang.Object
-
- elki.algorithm.statistics.RankingQualityHistogram<O>
-
- Type Parameters:
O
- Object type
- All Implemented Interfaces:
Algorithm
@Title("Ranking Quality Histogram") @Description("Evaluates the effectiveness of a distance function via the obtained rankings.") public class RankingQualityHistogram<O> extends java.lang.Object implements Algorithm
Evaluate a distance function with respect to kNN queries. For each point, the neighbors are sorted by distance, then the AUROC 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: Add sampling
- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface elki.Algorithm
Algorithm.Utils
-
-
Constructor Summary
Constructors Constructor Description RankingQualityHistogram(Distance<? super O> distance, int numbins)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TypeInformation[]
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.HistogramResult
run(Database database, Relation<O> relation)
Process a relation
-
-
-
Method Detail
-
getInputTypeRestriction
public TypeInformation[] getInputTypeRestriction()
Description copied from interface:Algorithm
Get the input type restriction used for negotiating the data query.- Specified by:
getInputTypeRestriction
in interfaceAlgorithm
- Returns:
- Type restriction
-
run
public HistogramResult run(Database database, Relation<O> relation)
Process a relation- Parameters:
database
- Database to processrelation
- Relation to process- Returns:
- Histogram of ranking qualities
-
-