Class FeatureBagging

  • All Implemented Interfaces:
    elki.Algorithm, OutlierAlgorithm

    @Title("Feature Bagging for Outlier Detection")
    @Reference(authors="A. Lazarevic, V. Kumar",
               title="Feature Bagging for Outlier Detection",
               booktitle="Proc. 11th ACM SIGKDD Int. Conf. on Knowledge Discovery in Data Mining",
               url="https://doi.org/10.1145/1081870.1081891",
               bibkey="DBLP:conf/kdd/LazarevicK05")
    public class FeatureBagging
    extends java.lang.Object
    implements OutlierAlgorithm
    A simple ensemble method called "Feature bagging" for outlier detection.

    Since the proposed method is only sensible to run on multiple instances of the same algorithm (due to incompatible score ranges), we do not allow using arbitrary algorithms.

    Reference:
    A. Lazarevic, V. Kumar
    Feature Bagging for Outlier Detection
    Proc. 11th ACM SIGKDD Int. Conf. on Knowledge Discovery in Data Mining

    Since:
    0.4.0
    Author:
    Erich Schubert, Remigius Wojdanowski
    • Nested Class Summary

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

        elki.Algorithm.Utils
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected boolean breadth
      Cumulative sum or breadth first combinations.
      private int k
      The parameters k for LOF.
      private static elki.logging.Logging LOG
      The logger for this class.
      protected int num
      Number of instances to use.
      private elki.utilities.random.RandomFactory rnd
      Random number generator for subspace choice.
    • Constructor Summary

      Constructors 
      Constructor Description
      FeatureBagging​(int k, int num, boolean breadth, elki.utilities.random.RandomFactory rnd)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      elki.data.type.TypeInformation[] getInputTypeRestriction()  
      private long[] randomSubspace​(int alldim, int mindim, int maxdim, java.util.Random rand)
      Choose a random subspace.
      OutlierResult run​(elki.database.relation.Relation<elki.data.NumberVector> relation)
      Run the algorithm on a data set.
      • 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.
      • num

        protected int num
        Number of instances to use.
      • breadth

        protected boolean breadth
        Cumulative sum or breadth first combinations.
      • rnd

        private elki.utilities.random.RandomFactory rnd
        Random number generator for subspace choice.
      • k

        private int k
        The parameters k for LOF.
    • Constructor Detail

      • FeatureBagging

        public FeatureBagging​(int k,
                              int num,
                              boolean breadth,
                              elki.utilities.random.RandomFactory rnd)
        Constructor.
        Parameters:
        k - k Parameter for LOF
        num - Number of subspaces to use
        breadth - Flag for breadth-first merging
        rnd - Random generator
    • Method Detail

      • getInputTypeRestriction

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

        public OutlierResult run​(elki.database.relation.Relation<elki.data.NumberVector> relation)
        Run the algorithm on a data set.
        Parameters:
        relation - Relation to use
        Returns:
        Outlier detection result
      • randomSubspace

        private long[] randomSubspace​(int alldim,
                                      int mindim,
                                      int maxdim,
                                      java.util.Random rand)
        Choose a random subspace.
        Parameters:
        alldim - Number of total dimensions
        mindim - Minimum number to choose
        maxdim - Maximum number to choose
        Returns:
        Subspace as bits.