O
- Object typepublic class KNNBenchmarkAlgorithm<O> extends AbstractDistanceBasedAlgorithm<O,Result>
Modifier and Type | Class and Description |
---|---|
static class |
KNNBenchmarkAlgorithm.Parameterizer<O>
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
protected int |
k
Number of neighbors to retrieve.
|
private static Logging |
LOG
The logger for this class.
|
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 |
---|
KNNBenchmarkAlgorithm(DistanceFunction<? super O> distanceFunction,
int k,
DatabaseConnection queries,
double sampling,
RandomFactory random)
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 RandomFactory random
public KNNBenchmarkAlgorithm(DistanceFunction<? super O> distanceFunction, int k, DatabaseConnection queries, double sampling, RandomFactory random)
distanceFunction
- Distance function to usek
- K parameterqueries
- Query data set (may be null!)sampling
- Sampling raterandom
- Random factorypublic 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>
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.