O - Object typepublic class EvaluateRetrievalPerformance<O> extends AbstractDistanceBasedAlgorithm<O,EvaluateRetrievalPerformance.RetrievalPerformanceResult>
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
EvaluateRetrievalPerformance.KNNEvaluator
Evaluate kNN retrieval performance. 
 | 
static class  | 
EvaluateRetrievalPerformance.Parameterizer<O>
Parameterization class. 
 | 
static class  | 
EvaluateRetrievalPerformance.RetrievalPerformanceResult
Result object for MAP scores. 
 | 
| Modifier and Type | Field and Description | 
|---|---|
protected boolean | 
includeSelf
Include query object in evaluation. 
 | 
private static Logging | 
LOG
The logger for this class. 
 | 
protected int | 
maxk
K nearest neighbors to use for classification evaluation. 
 | 
private java.lang.String | 
PREFIX
Prefix for statistics. 
 | 
protected RandomFactory | 
random
Random sampling seed. 
 | 
protected double | 
sampling
Relative number of object to use in sampling. 
 | 
ALGORITHM_IDDISTANCE_FUNCTION_ID| Constructor and Description | 
|---|
EvaluateRetrievalPerformance(DistanceFunction<? super O> distanceFunction,
                            double sampling,
                            RandomFactory random,
                            boolean includeSelf,
                            int maxk)
Constructor. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
private void | 
computeDistances(ModifiableDoubleDBIDList nlist,
                DBIDIter query,
                DistanceQuery<O> distQuery,
                Relation<O> relation)
Compute the distances to the neighbor objects. 
 | 
private void | 
findMatches(ModifiableDBIDs posn,
           Relation<?> lrelation,
           java.lang.Object label)
Find all matching objects. 
 | 
TypeInformation[] | 
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query. 
 | 
protected Logging | 
getLogger()
Get the (STATIC) logger for this class. 
 | 
protected static boolean | 
match(java.lang.Object ref,
     java.lang.Object test)
Test whether two relation agree. 
 | 
EvaluateRetrievalPerformance.RetrievalPerformanceResult | 
run(Database database,
   Relation<O> relation,
   Relation<?> lrelation)
Run the algorithm 
 | 
getDistanceFunctionrunprivate static final Logging LOG
protected double sampling
protected RandomFactory random
protected boolean includeSelf
private final java.lang.String PREFIX
protected int maxk
public EvaluateRetrievalPerformance(DistanceFunction<? super O> distanceFunction, double sampling, RandomFactory random, boolean includeSelf, int maxk)
distanceFunction - Distance functionsampling - Sampling raterandom - Random sampling generatorincludeSelf - Include query object in evaluationmaxk - Maximum k for kNN evaluationpublic EvaluateRetrievalPerformance.RetrievalPerformanceResult run(Database database, Relation<O> relation, Relation<?> lrelation)
database - Database to run on (for kNN queries)relation - Relation for distance computationslrelation - Relation for class label comparisonprotected static boolean match(java.lang.Object ref,
                               java.lang.Object test)
ref - Reference objecttest - Test objecttrue if the objects matchprivate void findMatches(ModifiableDBIDs posn, Relation<?> lrelation, java.lang.Object label)
posn - Output set.lrelation - Label relationlabel - Query object labelprivate void computeDistances(ModifiableDoubleDBIDList nlist, DBIDIter query, DistanceQuery<O> distQuery, Relation<O> relation)
nlist - Neighbor list (output)query - Query objectdistQuery - Distance functionrelation - Data relationpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<EvaluateRetrievalPerformance.RetrievalPerformanceResult>protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<EvaluateRetrievalPerformance.RetrievalPerformanceResult>Copyright © 2019 ELKI Development Team. License information.