O
- The object typepublic static class RandomSampleKNNPreprocessor.Factory<O> extends AbstractMaterializeKNNPreprocessor.Factory<O>
Modifier and Type | Class and Description |
---|---|
static class |
RandomSampleKNNPreprocessor.Factory.Parameterizer<O>
Parameterization class
|
Modifier and Type | Field and Description |
---|---|
private RandomFactory |
rnd
Random generator
|
private double |
share
Relative share of objects to get
|
DISTANCE_FUNCTION_ID, distanceFunction, k, K_ID
Constructor and Description |
---|
RandomSampleKNNPreprocessor.Factory(int k,
DistanceFunction<? super O> distanceFunction,
double share,
RandomFactory rnd)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
RandomSampleKNNPreprocessor<O> |
instantiate(Relation<O> relation)
Sets the database in the distance function of this index (if existing).
|
getDistanceFunction, getInputTypeRestriction
private final double share
private final RandomFactory rnd
public RandomSampleKNNPreprocessor.Factory(int k, DistanceFunction<? super O> distanceFunction, double share, RandomFactory rnd)
k
- KdistanceFunction
- distance functionshare
- Sample size (relative)rnd
- Random generatorpublic RandomSampleKNNPreprocessor<O> instantiate(Relation<O> relation)
IndexFactory
instantiate
in interface IndexFactory<O,KNNIndex<O>>
instantiate
in class AbstractMaterializeKNNPreprocessor.Factory<O>
relation
- the relation to indexCopyright © 2015 ELKI Development Team, Lehr- und Forschungseinheit für Datenbanksysteme, Ludwig-Maximilians-Universität München. License information.