Package elki.outlier

Class COP<V extends elki.data.NumberVector>

  • Type Parameters:
    V - the type of NumberVector handled by this Algorithm
    All Implemented Interfaces:
    elki.Algorithm, OutlierAlgorithm

    @Title("COP: Correlation Outlier Probability")
    @Reference(authors="Hans-Peter Kriegel, Peer Kr\u00f6ger, Erich Schubert, Arthur Zimek",
               title="Outlier Detection in Arbitrarily Oriented Subspaces",
               booktitle="Proc. IEEE Int. Conf. on Data Mining (ICDM 2012)",
               url="https://doi.org/10.1109/ICDM.2012.21",
               bibkey="DBLP:conf/icdm/KriegelKSZ12")
    public class COP<V extends elki.data.NumberVector>
    extends java.lang.Object
    implements OutlierAlgorithm
    Correlation outlier probability: Outlier Detection in Arbitrarily Oriented Subspaces

    Reference:

    Hans-Peter Kriegel, Peer Kröger, Erich Schubert, Arthur Zimek
    Outlier Detection in Arbitrarily Oriented Subspaces
    Proc. IEEE Int. Conf. on Data Mining (ICDM 2012)

    Since:
    0.5.5
    Author:
    Erich Schubert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  COP.DistanceDist
      Score type.
      static class  COP.Par<V extends elki.data.NumberVector>
      Parameterization class.
      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String COP_DIM
      Result name for the dimensionality.
      static java.lang.String COP_ERRORVEC
      Result name for the error vectors.
      static java.lang.String COP_SCORES
      Result name for the COP outlier scores.
      protected COP.DistanceDist dist
      Type of distribution to assume for distances.
      protected elki.distance.Distance<? super V> distance
      Distance function used.
      protected double expect
      Expected amount of outliers.
      protected int k
      Number of neighbors to be considered.
      private static elki.logging.Logging LOG
      The logger for this class.
      protected boolean models
      Include models in output.
      protected elki.math.linearalgebra.pca.PCARunner pca
      Holds the PCA runner.
      private static elki.utilities.datastructures.arraylike.DoubleArrayAdapter SHORTENED_ARRAY
      A clone of DoubleArrayAdapter that only uses the first 85% of the array!
    • Constructor Summary

      Constructors 
      Constructor Description
      COP​(elki.distance.Distance<? super V> distance, int k, elki.math.linearalgebra.pca.PCARunner pca, double expect, COP.DistanceDist dist, boolean models)
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static void computeCentroid​(double[] centroid, elki.database.relation.Relation<? extends elki.data.NumberVector> relation, elki.database.ids.DBIDs ids)
      Recompute the centroid of a set.
      elki.data.type.TypeInformation[] getInputTypeRestriction()  
      OutlierResult run​(elki.database.relation.Relation<V> relation)
      Process a single relation.
      • 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.
      • COP_SCORES

        public static final java.lang.String COP_SCORES
        Result name for the COP outlier scores.
        See Also:
        Constant Field Values
      • COP_DIM

        public static final java.lang.String COP_DIM
        Result name for the dimensionality.
        See Also:
        Constant Field Values
      • COP_ERRORVEC

        public static final java.lang.String COP_ERRORVEC
        Result name for the error vectors.
        See Also:
        Constant Field Values
      • SHORTENED_ARRAY

        private static final elki.utilities.datastructures.arraylike.DoubleArrayAdapter SHORTENED_ARRAY
        A clone of DoubleArrayAdapter that only uses the first 85% of the array!
      • distance

        protected elki.distance.Distance<? super V extends elki.data.NumberVector> distance
        Distance function used.
      • k

        protected int k
        Number of neighbors to be considered.
      • pca

        protected elki.math.linearalgebra.pca.PCARunner pca
        Holds the PCA runner.
      • expect

        protected double expect
        Expected amount of outliers.
      • dist

        protected COP.DistanceDist dist
        Type of distribution to assume for distances.
      • models

        protected boolean models
        Include models in output.
    • Constructor Detail

      • COP

        public COP​(elki.distance.Distance<? super V> distance,
                   int k,
                   elki.math.linearalgebra.pca.PCARunner pca,
                   double expect,
                   COP.DistanceDist dist,
                   boolean models)
        Constructor.
        Parameters:
        distance - distance function
        k - number of neighbors
        pca - PCA computation method
        expect - Expected fraction of outliers (for score normalization)
        dist - Distance distribution model (ChiSquared, Gamma)
        models - Report models
    • Method Detail

      • getInputTypeRestriction

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

        public OutlierResult run​(elki.database.relation.Relation<V> relation)
        Process a single relation.
        Parameters:
        relation - Relation to process
        Returns:
        Outlier detection result
      • computeCentroid

        private static void computeCentroid​(double[] centroid,
                                            elki.database.relation.Relation<? extends elki.data.NumberVector> relation,
                                            elki.database.ids.DBIDs ids)
        Recompute the centroid of a set.
        Parameters:
        centroid - Scratch buffer
        relation - Input data
        ids - IDs to include