Class Eclat

  • All Implemented Interfaces:
    elki.Algorithm

    @Reference(authors="M. J. Zaki, S. Parthasarathy, M. Ogihara, W. Li",
               title="New Algorithms for Fast Discovery of Association Rules",
               booktitle="Proc. 3rd ACM SIGKDD \'97 Int. Conf. on Knowledge Discovery and Data Mining",
               url="http://www.aaai.org/Library/KDD/1997/kdd97-060.php",
               bibkey="DBLP:conf/kdd/ZakiPOL97")
    public class Eclat
    extends AbstractFrequentItemsetAlgorithm
    Eclat is a depth-first discovery algorithm for mining frequent itemsets.

    Eclat discovers frequent itemsets by first transforming the data into a (sparse) column-oriented form, then performing a depth-first traversal of the prefix lattice, stopping traversal when the minimum support is no longer satisfied.

    This implementation is the basic algorithm only, and does not use diffsets. Columns are represented using a sparse representation, which theoretically is beneficial when the density is less than 1/31. This corresponds roughly to a minimum support of 3% for 1-itemsets. When searching for itemsets with a larger minimum support, it may be desirable to use a dense bitset representation instead and/or implement an automatic switching technique!

    Performance of this implementation is probably surpassed with a low-level C implementation based on SIMD bitset operations as long as support of an itemset is high, which are not easily accessible in Java.

    Reference:

    New Algorithms for Fast Discovery of Association Rules
    M. J. Zaki, S. Parthasarathy, M. Ogihara, W. Li
    Proc. 3rd ACM SIGKDD '97 Int. Conf. on Knowledge Discovery and Data Mining

    Since:
    0.7.0
    Author:
    Erich Schubert
    • Nested Class Summary

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

        elki.Algorithm.Utils
    • Constructor Summary

      Constructors 
      Constructor Description
      Eclat​(double minsupp, int minlength, int maxlength)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private elki.database.ids.DBIDs[] buildIndex​(elki.database.relation.Relation<elki.data.BitVector> relation, int dim, int minsupp)  
      private void extractItemsets​(elki.database.ids.DBIDs[] idx, int start, int minsupp, java.util.List<Itemset> solution)  
      private void extractItemsets​(elki.database.ids.DBIDs iset, elki.database.ids.DBIDs[] idx, int[] buf, int depth, int start, int minsupp, java.util.List<Itemset> solution)  
      elki.data.type.TypeInformation[] getInputTypeRestriction()  
      private elki.database.ids.DBIDs mergeJoin​(elki.database.ids.DBIDs first, elki.database.ids.DBIDs second)  
      FrequentItemsetsResult run​(elki.database.relation.Relation<elki.data.BitVector> relation)
      Run the Eclat algorithm
      • 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
        Class logger.
      • STAT

        private static final java.lang.String STAT
        Prefix for statistics.
    • Constructor Detail

      • Eclat

        public Eclat​(double minsupp,
                     int minlength,
                     int maxlength)
        Constructor.
        Parameters:
        minsupp - Minimum support
        minlength - Minimum length
        maxlength - Maximum length
    • Method Detail

      • getInputTypeRestriction

        public elki.data.type.TypeInformation[] getInputTypeRestriction()
      • run

        public FrequentItemsetsResult run​(elki.database.relation.Relation<elki.data.BitVector> relation)
        Run the Eclat algorithm
        Parameters:
        relation - Bit vector relation
        Returns:
        Frequent patterns found
      • extractItemsets

        private void extractItemsets​(elki.database.ids.DBIDs[] idx,
                                     int start,
                                     int minsupp,
                                     java.util.List<Itemset> solution)
      • extractItemsets

        private void extractItemsets​(elki.database.ids.DBIDs iset,
                                     elki.database.ids.DBIDs[] idx,
                                     int[] buf,
                                     int depth,
                                     int start,
                                     int minsupp,
                                     java.util.List<Itemset> solution)
      • mergeJoin

        private elki.database.ids.DBIDs mergeJoin​(elki.database.ids.DBIDs first,
                                                  elki.database.ids.DBIDs second)
      • buildIndex

        private elki.database.ids.DBIDs[] buildIndex​(elki.database.relation.Relation<elki.data.BitVector> relation,
                                                     int dim,
                                                     int minsupp)