Class LoOP<O>

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

    @Title("LoOP: Local Outlier Probabilities")
    @Description("Variant of the LOF algorithm normalized using statistical values.")
    @Reference(authors="Hans-Peter Kriegel, Peer Kr\u00f6ger, Erich Schubert, Arthur Zimek",
               title="LoOP: Local Outlier Probabilities",
               booktitle="Proc. 18th Int. Conf. Information and Knowledge Management (CIKM 2009)",
               url="https://doi.org/10.1145/1645953.1646195",
               bibkey="DBLP:conf/cikm/KriegelKSZ09")
    @Priority(200)
    public class LoOP<O>
    extends java.lang.Object
    implements OutlierAlgorithm
    LoOP: Local Outlier Probabilities

    Distance/density based algorithm similar to LOF to detect outliers, but with statistical methods to achieve better result stability.

    Reference:

    Hans-Peter Kriegel, Peer Kröger, Erich Schubert, Arthur Zimek:
    LoOP: Local Outlier Probabilities
    Proc. 18th Int. Conf. Information and Knowledge Management (CIKM 2009)

    Implementation notes:

    • The lambda parameter was removed from the pdist term, because it cancels out.
    • In ELKI 0.7.0, the k parameters have changed by 1 to make them similar to other methods and more intuitive.
    Since:
    0.3
    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> comparisonDistance
      Distance function for comparison set.
      (package private) int kcomp
      Comparison neighborhood size.
      (package private) int kreach
      Reachability neighborhood size.
      (package private) double lambda
      Lambda parameter.
      private static elki.logging.Logging LOG
      The logger for this class.
      protected elki.distance.Distance<? super O> reachabilityDistance
      Distance function for reachability.
    • Constructor Summary

      Constructors 
      Constructor Description
      LoOP​(int kreach, int kcomp, elki.distance.Distance<? super O> reachabilityDistance, elki.distance.Distance<? super O> comparisonDistance, double lambda)
      Constructor with parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void computePDists​(elki.database.relation.Relation<O> relation, elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knn, elki.database.datastore.WritableDoubleDataStore pdists)
      Compute the probabilistic distances used by LoOP.
      protected double computePLOFs​(elki.database.relation.Relation<O> relation, elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knn, elki.database.datastore.WritableDoubleDataStore pdists, elki.database.datastore.WritableDoubleDataStore plofs)
      Compute the LOF values, using the pdist distances.
      elki.data.type.TypeInformation[] getInputTypeRestriction()  
      OutlierResult run​(elki.database.relation.Relation<O> relation)
      Performs the LoOP algorithm on the given database.
      • 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.
      • kreach

        int kreach
        Reachability neighborhood size.
      • kcomp

        int kcomp
        Comparison neighborhood size.
      • lambda

        double lambda
        Lambda parameter.
      • reachabilityDistance

        protected elki.distance.Distance<? super O> reachabilityDistance
        Distance function for reachability.
      • comparisonDistance

        protected elki.distance.Distance<? super O> comparisonDistance
        Distance function for comparison set.
    • Constructor Detail

      • LoOP

        public LoOP​(int kreach,
                    int kcomp,
                    elki.distance.Distance<? super O> reachabilityDistance,
                    elki.distance.Distance<? super O> comparisonDistance,
                    double lambda)
        Constructor with parameters.
        Parameters:
        kreach - k for reachability
        kcomp - k for comparison
        reachabilityDistance - distance function for reachability
        comparisonDistance - distance function for comparison
        lambda - Lambda parameter
    • 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)
        Performs the LoOP algorithm on the given database.
        Parameters:
        relation - Relation to process
        Returns:
        Outlier result
      • computePDists

        protected void computePDists​(elki.database.relation.Relation<O> relation,
                                     elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knn,
                                     elki.database.datastore.WritableDoubleDataStore pdists)
        Compute the probabilistic distances used by LoOP.
        Parameters:
        relation - Data relation
        knn - kNN query
        pdists - Storage for distances
      • computePLOFs

        protected double computePLOFs​(elki.database.relation.Relation<O> relation,
                                      elki.database.query.knn.KNNSearcher<elki.database.ids.DBIDRef> knn,
                                      elki.database.datastore.WritableDoubleDataStore pdists,
                                      elki.database.datastore.WritableDoubleDataStore plofs)
        Compute the LOF values, using the pdist distances.
        Parameters:
        relation - Data relation
        knn - kNN query
        pdists - Precomputed distances
        plofs - Storage for PLOFs.
        Returns:
        Normalization factor.