Class EMOutlier<V extends NumberVector>

  • Type Parameters:
    V - Vector type
    All Implemented Interfaces:
    Algorithm, OutlierAlgorithm

    @Title("EM Outlier: Outlier Detection based on the generic EM clustering")
    @Description("The outlier score assigned is based on the highest cluster probability obtained from EM clustering.")
    public class EMOutlier<V extends NumberVector>
    extends java.lang.Object
    implements OutlierAlgorithm
    Outlier detection algorithm using EM Clustering.

    If an object does not belong to any cluster it is supposed to be an outlier. We use the log likelihood sum that the object is explained by the clustering as anomaly score in this approach. If you use this implementation as reference, please cite the latest ELKI release.

    Since:
    0.3
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected double delta
      Delta parameter
      protected int k
      Number of clusters
      private static Logging LOG
      The logger for this class.
      protected int maxiter
      Maximum number of iterations to allow
      protected EMClusterModelFactory<? super V,​?> mfactory
      Factory for producing the initial cluster model.
      protected static double MIN_LOGLIKELIHOOD
      Minimum loglikelihood to avoid -infinity.
      protected int miniter
      Minimum number of iterations to do
      protected double prior
      Prior to enable MAP estimation (use 0 for MLE)
    • Constructor Summary

      Constructors 
      Constructor Description
      EMOutlier​(int k, double delta, EMClusterModelFactory<? super V,​?> mfactory, int miniter, int maxiter, double prior)
      Constructor.
    • Field Detail

      • LOG

        private static final Logging LOG
        The logger for this class.
      • k

        protected int k
        Number of clusters
      • delta

        protected double delta
        Delta parameter
      • miniter

        protected int miniter
        Minimum number of iterations to do
      • maxiter

        protected int maxiter
        Maximum number of iterations to allow
      • prior

        protected double prior
        Prior to enable MAP estimation (use 0 for MLE)
      • MIN_LOGLIKELIHOOD

        protected static final double MIN_LOGLIKELIHOOD
        Minimum loglikelihood to avoid -infinity.
        See Also:
        Constant Field Values
    • Constructor Detail

      • EMOutlier

        public EMOutlier​(int k,
                         double delta,
                         EMClusterModelFactory<? super V,​?> mfactory,
                         int miniter,
                         int maxiter,
                         double prior)
        Constructor.
        Parameters:
        k - k parameter
        delta - delta parameter
        mfactory - EM cluster model factory
        miniter - Minimum number of iterations
        maxiter - Maximum number of iterations
        prior - MAP prior
    • Method Detail

      • getInputTypeRestriction

        public TypeInformation[] getInputTypeRestriction()
        Description copied from interface: Algorithm
        Get the input type restriction used for negotiating the data query.
        Specified by:
        getInputTypeRestriction in interface Algorithm
        Returns:
        Type restriction
      • run

        public OutlierResult run​(Relation<V> relation)
        Runs the algorithm in the timed evaluation part.
        Parameters:
        relation - Relation to process
        Returns:
        Outlier result