Documentation of 'ca.pfv.spmf.algorithms.frequentpatterns.aprioriTID.AlgoAprioriTID' Java class
AlgoAprioriTID
ca.pfv.spmf.algorithms.frequentpatterns.aprioriTID

Class AlgoAprioriTID



  • public class AlgoAprioriTID
    extends java.lang.Object
    This is an implementation of the AprioriTID algorithm.

    The AprioriTID algorithm finds all the frequents itemsets and their support in a binary context.

    AprioriTID can be faster than Apriori and produce the same result.

    AprioriTID was originally proposed in :

    Agrawal R, Srikant R. "Fast Algorithms for Mining Association Rules", VLDB. Sep 12-15 1994, Chile, 487-99,

    This implementation can save the result to a file or keep it into memory if no output path is provided to the runAlgorithm() method.

    See Also:
    Itemset, Itemsets
    • Constructor Summary

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getDatabaseSize()
      Get the number of transactions in the last database read.
      void printStats()
      Print statistics about the algorithm execution to System.out.
      Itemsets runAlgorithm(java.lang.String input, java.lang.String output, double minsup)
      This method run the algorithm.
      Itemsets runAlgorithm(TransactionDatabase database, double minsup)
      This method run the algorithm on a transaction database already in memory.
      void setEmptySetIsRequired(boolean emptySetIsRequired)
      Method to indicate if the empty set should be included in results or not.
      void setMaxItemsetSize(int maxItemsetSize)
      Set the maximum itemset size of itemsets to be found
      • Methods inherited from class java.lang.Object

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

      • AlgoAprioriTID

        public AlgoAprioriTID()
        Default constructor
    • Method Detail

      • runAlgorithm

        public Itemsets runAlgorithm(TransactionDatabase database,
                                     double minsup)
                              throws java.lang.NumberFormatException,
                                     java.io.IOException
        This method run the algorithm on a transaction database already in memory.
        Parameters:
        database - the transaction database
        minsup - the minimum support threshold as a percentage (double)
        Returns:
        the method returns frequent itemsets
        Throws:
        java.io.IOException - exception if error reading/writing the file
        java.lang.NumberFormatException
      • runAlgorithm

        public Itemsets runAlgorithm(java.lang.String input,
                                     java.lang.String output,
                                     double minsup)
                              throws java.lang.NumberFormatException,
                                     java.io.IOException
        This method run the algorithm.
        Parameters:
        input - the file path of an input file. if null, the result is returned by the method.
        output - the output file path
        minsup - the minimum support threshold as a percentage (double)
        Returns:
        if no output file path is provided, the method return frequent itemsets, otherwise null
        Throws:
        java.io.IOException - exception if error reading/writing the file
        java.lang.NumberFormatException
      • setMaxItemsetSize

        public void setMaxItemsetSize(int maxItemsetSize)
        Set the maximum itemset size of itemsets to be found
        Parameters:
        maxItemsetSize - maximum itemset size.
      • setEmptySetIsRequired

        public void setEmptySetIsRequired(boolean emptySetIsRequired)
        Method to indicate if the empty set should be included in results or not.
        Parameters:
        emptySetIsRequired - if true the empty set will be included.
      • printStats

        public void printStats()
        Print statistics about the algorithm execution to System.out.
      • getDatabaseSize

        public int getDatabaseSize()
        Get the number of transactions in the last database read.
        Returns:
        number of transactions.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.