Class 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 by elki.outlier.lof.LOF.
    Since:
    0.2
    Author:
    Erich Schubert
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        Logger to use
      • partitions

        private final int partitions
        Number of partitions to use.
      • rnd

        private final elki.utilities.random.RandomFactory rnd
        Random generator
    • 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 process
        distance - the distance function to use
        k - query k
        partitions - Number of partitions
        rnd - Random number generator