O
- the type of objects handled by this Algorithm@Title(value="KNN-Distance-Order") @Description(value="Assesses the knn distances for a specified k and orders them.") public class KNNDistancesSampler<O> extends AbstractDistanceBasedAlgorithm<O,KNNDistancesSampler.KNNDistanceOrderResult>
Modifier and Type | Class and Description |
---|---|
static class |
KNNDistancesSampler.KNNDistanceOrderResult
Curve result for a list containing the knn distances.
|
static class |
KNNDistancesSampler.Parameterizer<O>
Parameterization class.
|
Modifier and Type | Field and Description |
---|---|
protected int |
k
Parameter k.
|
private static Logging |
LOG
The logger for this class.
|
private RandomFactory |
rnd
Random number seeding.
|
protected double |
sample
Sampling percentage.
|
DISTANCE_FUNCTION_ID
Constructor and Description |
---|
KNNDistancesSampler(DistanceFunction<? super O> distanceFunction,
int k,
double sample,
RandomFactory rnd)
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.
|
KNNDistancesSampler.KNNDistanceOrderResult |
run(Database database,
Relation<O> relation)
Provides an order of the kNN-distances for all objects within the specified
database.
|
getDistanceFunction
makeParameterDistanceFunction, run
private static final Logging LOG
protected int k
protected double sample
private RandomFactory rnd
public KNNDistancesSampler(DistanceFunction<? super O> distanceFunction, int k, double sample, RandomFactory rnd)
distanceFunction
- Distance functionk
- k Parametersample
- Sampling rate, or sample size (when > 1)rnd
- Random source.public KNNDistancesSampler.KNNDistanceOrderResult run(Database database, Relation<O> relation)
database
- Databaserelation
- Relationpublic TypeInformation[] getInputTypeRestriction()
AbstractAlgorithm
getInputTypeRestriction
in interface Algorithm
getInputTypeRestriction
in class AbstractAlgorithm<KNNDistancesSampler.KNNDistanceOrderResult>
protected Logging getLogger()
AbstractAlgorithm
getLogger
in class AbstractAlgorithm<KNNDistancesSampler.KNNDistanceOrderResult>
Copyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.