Class SimplifiedLOF<O>

  • Type Parameters:
    O - the type of data objects handled by this algorithm
    All Implemented Interfaces:
    elki.Algorithm, OutlierAlgorithm

    @Reference(authors="Erich Schubert, Arthur Zimek, Hans-Peter Kriegel",
               title="Local Outlier Detection Reconsidered: a Generalized View on Locality with Applications to Spatial, Video, and Network Outlier Detection",
               booktitle="Data Mining and Knowledge Discovery 28(1)",
               url="https://doi.org/10.1007/s10618-012-0300-z",
               bibkey="DBLP:journals/datamine/SchubertZK14")
    public class SimplifiedLOF<O>
    extends java.lang.Object
    implements OutlierAlgorithm
    A simplified version of the original LOF algorithm, which does not use the reachability distance, yielding less stable results on inliers.

    Reference:

    Erich Schubert, Arthur Zimek, Hans-Peter Kriegel
    Local Outlier Detection Reconsidered: a Generalized View on Locality with Applications to Spatial, Video, and Network Outlier Detection
    Data Mining and Knowledge Discovery 28(1)

    Since:
    0.5.5
    Author:
    Erich Schubert
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected elki.distance.Distance<? super O> distance
      Distance function used.
      protected int kplus
      The number of neighbors to query, plus the query point.
      private static elki.logging.Logging LOG
      The logger for this class.
    • Constructor Summary

      Constructors 
      Constructor Description
      SimplifiedLOF​(elki.distance.Distance<? super O> distance, int k)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void computeSimplifiedLOFs​(elki.database.ids.DBIDs ids, elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq, elki.database.datastore.WritableDoubleDataStore slrds, elki.database.datastore.WritableDoubleDataStore lofs, elki.math.DoubleMinMax lofminmax)
      Compute the simplified LOF factors.
      private void computeSimplifiedLRDs​(elki.database.ids.DBIDs ids, elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq, elki.database.datastore.WritableDoubleDataStore lrds)
      Compute the simplified reachability densities.
      elki.data.type.TypeInformation[] getInputTypeRestriction()  
      OutlierResult run​(elki.database.relation.Relation<O> relation)
      Run the Simple LOF algorithm.
      • 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.
      • distance

        protected elki.distance.Distance<? super O> distance
        Distance function used.
      • kplus

        protected int kplus
        The number of neighbors to query, plus the query point.
    • Constructor Detail

      • SimplifiedLOF

        public SimplifiedLOF​(elki.distance.Distance<? super O> distance,
                             int k)
        Constructor.
        Parameters:
        distance - Distance function
        k - the number of neighbors
    • Method Detail

      • getInputTypeRestriction

        public elki.data.type.TypeInformation[] getInputTypeRestriction()
        Specified by:
        getInputTypeRestriction in interface elki.Algorithm
      • run

        public OutlierResult run​(elki.database.relation.Relation<O> relation)
        Run the Simple LOF algorithm.
        Parameters:
        relation - Data to process
        Returns:
        LOF outlier result
      • computeSimplifiedLRDs

        private void computeSimplifiedLRDs​(elki.database.ids.DBIDs ids,
                                           elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq,
                                           elki.database.datastore.WritableDoubleDataStore lrds)
        Compute the simplified reachability densities.
        Parameters:
        ids - IDs to process
        knnq - kNN query class
        lrds - Density output
      • computeSimplifiedLOFs

        private void computeSimplifiedLOFs​(elki.database.ids.DBIDs ids,
                                           elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knnq,
                                           elki.database.datastore.WritableDoubleDataStore slrds,
                                           elki.database.datastore.WritableDoubleDataStore lofs,
                                           elki.math.DoubleMinMax lofminmax)
        Compute the simplified LOF factors.
        Parameters:
        ids - IDs to compute for
        knnq - kNN query class
        slrds - Object densities
        lofs - SLOF output storage
        lofminmax - Minimum and maximum scores