Documentation of 'ca.pfv.spmf.algorithms.frequentpatterns.itemsettree.ItemsetTree' Java class
ItemsetTree
ca.pfv.spmf.algorithms.frequentpatterns.itemsettree

Class ItemsetTree

  • All Implemented Interfaces:
    java.io.Serializable


    public class ItemsetTree
    extends java.lang.Object
    implements java.io.Serializable
    An implementation of the Itemset-tree It is based on the description in: Kubat, M., Hafez, A., Raghavan, V. V., Lekkala, J. R., Chen, W. K. (2003) Itemset Trees for Targeted Association Querying. Proc. of ICDE 2003. Copyright (c) 2008-2012 Philippe Fournier-Viger This file is part of the SPMF DATA MINING SOFTWARE (http://www.philippe-fournier-viger.com/spmf). SPMF is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. SPMF is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with SPMF. If not, see .
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor and Description
      ItemsetTree()
      Default constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addTransaction(int[] transaction)
      Add a transaction to the itemset tree.
      void buildTree(java.lang.String input)
      Build the itemset-tree based on an input file containing transactions
      java.util.List<AssociationRuleIT> generateRules(int[] s, int minsup, double minconf)
      Generate all association rules with a given itemset as antecedent.
      HashTableIT getFrequentItemsetSubsuming(int[] s)
      This method pass through the itemset tree to get all itemsets that are subsuming a given itemset "s" and their support.
      HashTableIT getFrequentItemsetSubsuming(int[] is, int minsup)
      Get the frequent itemsets subsuming a given itemset for a given minimum support value.
      int getSupportOfItemset(int[] s)
      Get the support of a given itemset s.
      void printStatistics()
      Print statistics about the time and maximum memory usage for the construction of the itemset tree.
      void printTree()
      Print the tree to System.out.
      java.lang.String toString()
      Return a string representation of the tree.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ItemsetTree

        public ItemsetTree()
        Default constructor
    • Method Detail

      • buildTree

        public void buildTree(java.lang.String input)
                       throws java.io.IOException
        Build the itemset-tree based on an input file containing transactions
        Parameters:
        input - an input file
        Throws:
        java.io.IOException - exception if error while reading the file
      • addTransaction

        public void addTransaction(int[] transaction)
        Add a transaction to the itemset tree.
        Parameters:
        transaction - the transaction to be added (array of ints)
      • printStatistics

        public void printStatistics()
        Print statistics about the time and maximum memory usage for the construction of the itemset tree.
      • printTree

        public void printTree()
        Print the tree to System.out.
      • toString

        public java.lang.String toString()
        Return a string representation of the tree.
        Overrides:
        toString in class java.lang.Object
      • getSupportOfItemset

        public int getSupportOfItemset(int[] s)
        Get the support of a given itemset s.
        Parameters:
        s - the itemset
        Returns:
        the support as an integer.
      • getFrequentItemsetSubsuming

        public HashTableIT getFrequentItemsetSubsuming(int[] s)
        This method pass through the itemset tree to get all itemsets that are subsuming a given itemset "s" and their support. Note that this method may also return infrequent itemsets that can be filtered by additional processing after.
        Parameters:
        s - the itemset
        Returns:
        an hashtable countaining itemsets and their support.
      • getFrequentItemsetSubsuming

        public HashTableIT getFrequentItemsetSubsuming(int[] is,
                                                       int minsup)
        Get the frequent itemsets subsuming a given itemset for a given minimum support value.
        Parameters:
        is - the itemset
        minsup - the minimum support threshold (integer)
        Returns:
        an hashtable containing the frequent itemsets
      • generateRules

        public java.util.List<AssociationRuleIT> generateRules(int[] s,
                                                               int minsup,
                                                               double minconf)
        Generate all association rules with a given itemset as antecedent.
        Parameters:
        s - the itemset to be used as antecedent
        minsup - the minsup threshold to be used
        minconf - the minconf threshold to be used
        Returns:
        a list of association rules

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.