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 |
|---|
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, getInputTypeRestrictionprivate final double share
private final RandomFactory rnd
public 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)
IndexFactoryinstantiate in interface IndexFactory<O>instantiate in class AbstractMaterializeKNNPreprocessor.Factory<O>relation - the relation to indexCopyright © 2019 ELKI Development Team. License information.