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.") @Alias(value="de.lmu.ifi.dbs.elki.algorithm.KNNDistanceOrder") @Reference(authors="Martin Ester, Hans-Peter Kriegel, J\u00f6rg Sander, Xiaowei Xu",title="A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases with Noise",booktitle="Proc. 2nd Int. Conf. on Knowledge Discovery and Data Mining (KDD \'96)",url="http://www.aaai.org/Library/KDD/1996/kdd96-037.php",bibkey="DBLP:conf/kdd/EsterKSX96") @Reference(authors="Erich Schubert, J\u00f6rg Sander, Martin Ester, Hans-Peter Kriegel, Xiaowei Xu",title="DBSCAN Revisited, Revisited: Why and How You Should (Still) Use DBSCAN",booktitle="ACM Trans. Database Systems (TODS)",url="https://doi.org/10.1145/3068335",bibkey="DBLP:journals/tods/SchubertSEKX17") public class KNNDistancesSampler<O> extends AbstractDistanceBasedAlgorithm<O,KNNDistancesSampler.KNNDistanceOrderResult>
This class can be used to estimate parameters for other algorithms, such as estimating the epsilon parameter for DBSCAN: set k to minPts-1, and then choose a percentile from the sample as epsilon, or plot the result as a graph and look for a bend or knee in this plot.
Reference:
 Martin Ester, Hans-Peter Kriegel, Jörg Sander, Xiaowei Xu
 A Density-Based Algorithm for Discovering Clusters in Large Spatial Databases
 with Noise
 Proc. 2nd Int. Conf. on Knowledge Discovery and Data Mining (KDD '96)
 
Further discussion:
 Erich Schubert, Jörg Sander, Martin Ester, Hans-Peter Kriegel, Xiaowei Xu
 DBSCAN Revisited, Revisited: Why and How You Should (Still) Use DBSCAN
 ACM Trans. Database Systems (TODS)
| 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. 
 | 
ALGORITHM_IDDISTANCE_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. 
 | 
getDistanceFunctionrunprivate 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()
AbstractAlgorithmgetInputTypeRestriction in interface AlgorithmgetInputTypeRestriction in class AbstractAlgorithm<KNNDistancesSampler.KNNDistanceOrderResult>protected Logging getLogger()
AbstractAlgorithmgetLogger in class AbstractAlgorithm<KNNDistancesSampler.KNNDistanceOrderResult>Copyright © 2019 ELKI Development Team. License information.