Package elki.index.preprocessed.knn
Class PartitionApproximationMaterializeKNNPreprocessor<O>
- java.lang.Object
-
- elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor<O>
-
- elki.index.preprocessed.knn.PartitionApproximationMaterializeKNNPreprocessor<O>
-
- Type Parameters:
O- the type of database objects the preprocessor can be applied to
- All Implemented Interfaces:
elki.index.Index,elki.index.KNNIndex<O>
@Title("Partitioning Approximate kNN Preprocessor") @Description("Caterializes the (approximate) k nearest neighbors of objects of a database by partitioning and only computing kNN within each partition.") public class PartitionApproximationMaterializeKNNPreprocessor<O> extends AbstractMaterializeKNNPreprocessor<O>A preprocessor for annotation of the k nearest neighbors (and their distances) to each database object. Used for example byelki.outlier.lof.LOF.- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPartitionApproximationMaterializeKNNPreprocessor.Factory<O>The parameterizable factory.
-
Field Summary
Fields Modifier and Type Field Description private static elki.logging.LoggingLOGLogger to useprivate intpartitionsNumber of partitions to use.private elki.utilities.random.RandomFactoryrndRandom generator-
Fields inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor
distance, distanceQuery, k, relation, storage
-
-
Constructor Summary
Constructors Constructor Description PartitionApproximationMaterializeKNNPreprocessor(elki.database.relation.Relation<O> relation, elki.distance.Distance<? super O> distance, int k, int partitions, elki.utilities.random.RandomFactory rnd)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected elki.logging.LogginggetLogger()Get the classes static logger.protected voidpreprocess()Perform the preprocessing step.-
Methods inherited from class elki.index.preprocessed.knn.AbstractMaterializeKNNPreprocessor
createStorage, get, getDistanceQuery, getK, initialize, kNNByDBID, kNNByObject
-
-
-
-
Constructor Detail
-
PartitionApproximationMaterializeKNNPreprocessor
public PartitionApproximationMaterializeKNNPreprocessor(elki.database.relation.Relation<O> relation, elki.distance.Distance<? super O> distance, int k, int partitions, elki.utilities.random.RandomFactory rnd)
Constructor- Parameters:
relation- Relation to processdistance- the distance function to usek- query kpartitions- Number of partitionsrnd- Random number generator
-
-
Method Detail
-
preprocess
protected void preprocess()
Description copied from class:AbstractMaterializeKNNPreprocessorPerform the preprocessing step.- Specified by:
preprocessin classAbstractMaterializeKNNPreprocessor<O>
-
getLogger
protected elki.logging.Logging getLogger()
Description copied from class:AbstractMaterializeKNNPreprocessorGet the classes static logger.- Specified by:
getLoggerin classAbstractMaterializeKNNPreprocessor<O>- Returns:
- Logger
-
-