Package elki.application.benchmark
Class ValidateApproximativeKNNIndex<O>
- java.lang.Object
-
- elki.application.AbstractApplication
-
- elki.application.AbstractDistanceBasedApplication<O>
-
- elki.application.benchmark.ValidateApproximativeKNNIndex<O>
-
- Type Parameters:
O- Object type
public class ValidateApproximativeKNNIndex<O> extends AbstractDistanceBasedApplication<O>
Algorithm to validate the quality of an approximative kNN index, by performing a number of queries and comparing them to the results obtained by exact indexing (e.g., linear scanning).- Since:
- 0.6.0
- Author:
- Erich Schubert
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanforcelinearForce linear scanning.protected intkNumber of neighbors to retrieve.private static LoggingLOGThe logger for this class.protected java.util.regex.PatternpatternFilter patternprotected DatabaseConnectionqueriesThe alternate query point source.protected RandomFactoryrandomRandom generator factoryprotected doublesamplingSampling size.-
Fields inherited from class elki.application.AbstractDistanceBasedApplication
distance, inputstep
-
Fields inherited from class elki.application.AbstractApplication
REFERENCE, VERSION
-
-
Constructor Summary
Constructors Constructor Description ValidateApproximativeKNNIndex(InputStep input, Distance<? super O> distance, int k, DatabaseConnection queries, double sampling, boolean forcelinear, RandomFactory random, java.util.regex.Pattern pattern)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrun()Runs the application.-
Methods inherited from class elki.application.AbstractApplication
printErrorMessage, runCLIApplication, usage
-
-
-
-
Field Detail
-
LOG
private static final Logging LOG
The logger for this class.
-
k
protected int k
Number of neighbors to retrieve.
-
queries
protected DatabaseConnection queries
The alternate query point source. Optional.
-
sampling
protected double sampling
Sampling size.
-
forcelinear
protected boolean forcelinear
Force linear scanning.
-
random
protected RandomFactory random
Random generator factory
-
pattern
protected java.util.regex.Pattern pattern
Filter pattern
-
-
Constructor Detail
-
ValidateApproximativeKNNIndex
public ValidateApproximativeKNNIndex(InputStep input, Distance<? super O> distance, int k, DatabaseConnection queries, double sampling, boolean forcelinear, RandomFactory random, java.util.regex.Pattern pattern)
Constructor.- Parameters:
input- Data inputdistance- Distance function to usek- K parameterqueries- Query data set (may be null!)sampling- Sampling raterandom- Random factoryforcelinear- Force the use of linear scanning.pattern-
-
-
Method Detail
-
run
public void run()
Description copied from class:AbstractApplicationRuns the application.- Specified by:
runin classAbstractApplication
-
-