O
- Object typepublic class ValidateApproximativeKNNIndex<O,D extends Distance<D>> extends AbstractDistanceBasedAlgorithm<O,D,Result>
Modifier and Type | Class and Description |
---|---|
static class |
ValidateApproximativeKNNIndex.Parameterizer<O,D extends Distance<D>>
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
forcelinear
Force linear scanning.
|
protected int |
k
Number of neighbors to retrieve.
|
private static Logging |
LOG
The logger for this class.
|
protected Pattern |
pattern
Filter pattern
|
protected DatabaseConnection |
queries
The alternate query point source.
|
protected RandomFactory |
random
Random generator factory
|
protected double |
sampling
Sampling size.
|
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
ValidateApproximativeKNNIndex(DistanceFunction<? super O,D> distanceFunction,
int k,
DatabaseConnection queries,
double sampling,
boolean forcelinear,
RandomFactory random,
Pattern pattern)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
TypeInformation[] |
getInputTypeRestriction()
Get the input type restriction used for negotiating the data query.
|
protected Logging |
getLogger()
Get the (STATIC) logger for this class.
|
Result |
run(Database database,
Relation<O> relation)
Run the algorithm.
|
getDistanceFunction
makeParameterDistanceFunction, run
private static final Logging LOG
protected int k
protected DatabaseConnection queries
protected double sampling
protected boolean forcelinear
protected RandomFactory random
protected Pattern pattern
public ValidateApproximativeKNNIndex(DistanceFunction<? super O,D> distanceFunction, int k, DatabaseConnection queries, double sampling, boolean forcelinear, RandomFactory random, Pattern pattern)
distanceFunction
- Distance function to usek
- K parameterqueries
- Query data set (may be null!)sampling
- Sampling raterandom
- Random factoryforcelinear
- Force the use of linear scanning.pattern
- public Result run(Database database, Relation<O> relation)
database
- Databaserelation
- Relationpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<Result>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<Result>