Class OnlineLOF<O>

  • All Implemented Interfaces:
    elki.Algorithm, OutlierAlgorithm

    public class OnlineLOF<O>
    extends FlexibleLOF<O>
    Incremental version of the LOF Algorithm, supports insertions and removals.
    Since:
    0.4.0
    Author:
    Elke Achtert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private class  OnlineLOF.LOFKNNListener
      Encapsulates a listener for changes of kNNs used in the online LOF algorithm.
      static class  OnlineLOF.Par<O>
      Parameterization class.
      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Constructor Summary

      Constructors 
      Constructor Description
      OnlineLOF​(int krefer, int kreach, elki.distance.Distance<? super O> neighborhoodDistance, elki.distance.Distance<? super O> reachabilityDistance)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private elki.utilities.pairs.Pair<elki.utilities.pairs.Pair<elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef>,​elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef>>,​elki.utilities.pairs.Pair<elki.database.query.rknn.RKNNSearcher<elki.database.ids.DBIDRef>,​elki.database.query.rknn.RKNNSearcher<elki.database.ids.DBIDRef>>> getKNNAndRkNNQueries​(elki.database.relation.Relation<O> relation, elki.logging.progress.StepProgress stepprog)
      Get the kNN and rkNN queries for the algorithm.
      OutlierResult run​(elki.database.relation.Relation<O> relation)
      Performs the Generalized LOF_SCORE algorithm on the given database by calling #doRunInTime(Database) and adds a OnlineLOF.LOFKNNListener to the preprocessors.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • LOG

        private static final elki.logging.Logging LOG
        The logger for this class.
    • Constructor Detail

      • OnlineLOF

        public OnlineLOF​(int krefer,
                         int kreach,
                         elki.distance.Distance<? super O> neighborhoodDistance,
                         elki.distance.Distance<? super O> reachabilityDistance)
        Constructor.
        Parameters:
        krefer - The number of neighbors for reference
        kreach - The number of neighbors for reachability distance
        neighborhoodDistance - the neighborhood distance function
        reachabilityDistance - the reachability distance function
    • Method Detail

      • run

        public OutlierResult run​(elki.database.relation.Relation<O> relation)
        Performs the Generalized LOF_SCORE algorithm on the given database by calling #doRunInTime(Database) and adds a OnlineLOF.LOFKNNListener to the preprocessors.
        Overrides:
        run in class FlexibleLOF<O>
        Parameters:
        relation - Data to process
        Returns:
        LOF outlier result
      • getKNNAndRkNNQueries

        private elki.utilities.pairs.Pair<elki.utilities.pairs.Pair<elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef>,​elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef>>,​elki.utilities.pairs.Pair<elki.database.query.rknn.RKNNSearcher<elki.database.ids.DBIDRef>,​elki.database.query.rknn.RKNNSearcher<elki.database.ids.DBIDRef>>> getKNNAndRkNNQueries​(elki.database.relation.Relation<O> relation,
                                                                                                                                                                                                                                                                                                                                                                                                        elki.logging.progress.StepProgress stepprog)
        Get the kNN and rkNN queries for the algorithm.
        Parameters:
        relation - Data
        stepprog - Progress logger
        Returns:
        the kNN and rkNN queries