Package elki.outlier

Class GaussianUniformMixture

  • All Implemented Interfaces:
    elki.Algorithm, OutlierAlgorithm

    @Title("Gaussian-Uniform Mixture Model Outlier Detection")
    @Description("Fits a mixture model consisting of a Gaussian and a uniform distribution to the data.")
    @Reference(prefix="Generalization using the likelihood gain as outlier score of",
               authors="E. Eskin",
               title="Anomaly detection over noisy data using learned probability distributions",
               booktitle="Proc. 17th Int. Conf. on Machine Learning (ICML-2000)",
               url="https://doi.org/10.7916/D8C53SKF",
               bibkey="DBLP:conf/icml/Eskin00")
    public class GaussianUniformMixture
    extends java.lang.Object
    implements OutlierAlgorithm
    Outlier detection algorithm using a mixture model approach. The data is modeled as a mixture of two distributions, a Gaussian distribution for ordinary data and a uniform distribution for outliers. At first all Objects are in the set of normal objects and the set of anomalous objects is empty. An iterative procedure then transfers objects from the ordinary set to the anomalous set if the transfer increases the overall likelihood of the data.

    Reference:

    E. Eskin
    Anomaly detection over noisy data using learned probability distributions
    Proc. 17th Int. Conf. on Machine Learning (ICML-2000)

    Since:
    0.3
    Author:
    Lisa Reichert
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GaussianUniformMixture.Par
      Parameterization class.
      • Nested classes/interfaces inherited from interface elki.Algorithm

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private double c
      Holds the cutoff value.
      private double logl
      log(l) precomputed
      private double logml
      log(1-l) precomputed
      private static int MAX_ITER
      Maximum number of iterations to do.
    • Constructor Summary

      Constructors 
      Constructor Description
      GaussianUniformMixture​(double l, double c)
      Constructor with parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      elki.data.type.TypeInformation[] getInputTypeRestriction()  
      private double loglikelihoodAnomalous​(elki.database.ids.DBIDs anomalousObjs)
      Loglikelihood anomalous objects.
      private double loglikelihoodNormal​(elki.database.ids.DBIDs objids, elki.database.ids.SetDBIDs anomalous, elki.math.linearalgebra.CovarianceMatrix builder, elki.database.relation.Relation<? extends elki.data.NumberVector> relation)
      Computes the loglikelihood of all normal objects.
      OutlierResult run​(elki.database.relation.Relation<? extends elki.data.NumberVector> relation)
      Run the algorithm
      • Methods inherited from class java.lang.Object

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

      • MAX_ITER

        private static final int MAX_ITER
        Maximum number of iterations to do.
        See Also:
        Constant Field Values
      • c

        private double c
        Holds the cutoff value.
      • logl

        private double logl
        log(l) precomputed
      • logml

        private double logml
        log(1-l) precomputed
    • Constructor Detail

      • GaussianUniformMixture

        public GaussianUniformMixture​(double l,
                                      double c)
        Constructor with parameters.
        Parameters:
        l - l value
        c - c value
    • Method Detail

      • getInputTypeRestriction

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

        public OutlierResult run​(elki.database.relation.Relation<? extends elki.data.NumberVector> relation)
        Run the algorithm
        Parameters:
        relation - Data relation
        Returns:
        Outlier result
      • loglikelihoodAnomalous

        private double loglikelihoodAnomalous​(elki.database.ids.DBIDs anomalousObjs)
        Loglikelihood anomalous objects. Uniform distribution.
        Parameters:
        anomalousObjs -
        Returns:
        loglikelihood for anomalous objects
      • loglikelihoodNormal

        private double loglikelihoodNormal​(elki.database.ids.DBIDs objids,
                                           elki.database.ids.SetDBIDs anomalous,
                                           elki.math.linearalgebra.CovarianceMatrix builder,
                                           elki.database.relation.Relation<? extends elki.data.NumberVector> relation)
        Computes the loglikelihood of all normal objects. Gaussian model
        Parameters:
        objids - Object IDs for 'normal' objects.
        builder - Covariance matrix builder
        relation - Database
        Returns:
        loglikelihood for normal objects