Package elki.index.preprocessed.knn
Class SpacefillingMaterializeKNNPreprocessor<O extends elki.data.NumberVector>
- java.lang.Object
-
- elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O>
-
- elki.index.preprocessed.knn.SpacefillingMaterializeKNNPreprocessor<O>
-
- Type Parameters:
O- Vector type indexed
- All Implemented Interfaces:
elki.index.Index,elki.index.KNNIndex<O>
@Reference(authors="Erich Schubert, Arthur Zimek, Hans-Peter Kriegel", title="Fast and Scalable Outlier Detection with Approximate Nearest Neighbor Ensembles", booktitle="Proc. 20th Int. Conf. Database Systems for Advanced Applications (DASFAA 2015)", url="https://doi.org/10.1007/978-3-319-18123-3_2", bibkey="DBLP:conf/dasfaa/SchubertZK15") public class SpacefillingMaterializeKNNPreprocessor<O extends elki.data.NumberVector> extends AbstractMaterializeKNNPreprocessor<O>Compute the nearest neighbors approximatively using space filling curves.This version does the bulk kNN-join operation, i.e. precomputes the k nearest neighbors for every object, then discards the curves. This is usually more memory intensive but faster than
SpacefillingKNNPreprocessor.Reference:
Erich Schubert, Arthur Zimek, Hans-Peter Kriegel
Fast and Scalable Outlier Detection with Approximate Nearest Neighbor Ensembles
Proc. 20th Int. Conf. Database Systems for Advanced Applications (DASFAA 2015)- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSpacefillingMaterializeKNNPreprocessor.Factory<V extends elki.data.NumberVector>Index factory class
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.List<? extends elki.math.spacefillingcurves.SpatialSorter>curvegenSpatial curve generatorsprivate static elki.logging.LoggingLOGClass logger(package private) elki.math.MeanmeanMean number of distance computations(package private) java.util.RandomrandomRandom number generator.(package private) intvariantsNumber of variants to generate for each curve(package private) doublewindowCurve window size-
Fields inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor
distance, distanceQuery, k, relation, storage
-
-
Constructor Summary
Constructors Constructor Description SpacefillingMaterializeKNNPreprocessor(elki.database.relation.Relation<O> relation, elki.distance.Distance<? super O> distance, int k, java.util.List<? extends elki.math.spacefillingcurves.SpatialSorter> curvegen, double window, int variants, java.util.Random random)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected elki.logging.LogginggetLogger()Get the classes static logger.elki.database.query.knn.KNNSearcher<O>kNNByObject(elki.database.query.distance.DistanceQuery<O> distQ, int maxk, int flags)voidlogStatistics()protected voidpreprocess()Perform the preprocessing step.-
Methods inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor
createStorage, get, getDistanceQuery, getK, initialize, kNNByDBID
-
-
-
-
Field Detail
-
LOG
private static final elki.logging.Logging LOG
Class logger
-
curvegen
final java.util.List<? extends elki.math.spacefillingcurves.SpatialSorter> curvegen
Spatial curve generators
-
window
final double window
Curve window size
-
variants
final int variants
Number of variants to generate for each curve
-
mean
elki.math.Mean mean
Mean number of distance computations
-
random
java.util.Random random
Random number generator.
-
-
Constructor Detail
-
SpacefillingMaterializeKNNPreprocessor
public SpacefillingMaterializeKNNPreprocessor(elki.database.relation.Relation<O> relation, elki.distance.Distance<? super O> distance, int k, java.util.List<? extends elki.math.spacefillingcurves.SpatialSorter> curvegen, double window, int variants, java.util.Random random)
Constructor.- Parameters:
relation- Relation to index.distance- Distance functionk- kcurvegen- Curve generatorswindow- Window multiplicatorvariants- Number of curve variants to generaterandom- Random number generator
-
-
Method Detail
-
preprocess
protected void preprocess()
Description copied from class:AbstractMaterializeKNNPreprocessorPerform the preprocessing step.- Specified by:
preprocessin classAbstractMaterializeKNNPreprocessor<O extends elki.data.NumberVector>
-
logStatistics
public void logStatistics()
-
getLogger
protected elki.logging.Logging getLogger()
Description copied from class:AbstractMaterializeKNNPreprocessorGet the classes static logger.- Specified by:
getLoggerin classAbstractMaterializeKNNPreprocessor<O extends elki.data.NumberVector>- Returns:
- Logger
-
kNNByObject
public elki.database.query.knn.KNNSearcher<O> kNNByObject(elki.database.query.distance.DistanceQuery<O> distQ, int maxk, int flags)
- Specified by:
kNNByObjectin interfaceelki.index.KNNIndex<O extends elki.data.NumberVector>- Overrides:
kNNByObjectin classAbstractMaterializeKNNPreprocessor<O extends elki.data.NumberVector>
-
-