Documentation of 'ca.pfv.spmf.algorithms.frequentpatterns.two_phase.ItemsetsTP' Java class
ItemsetsTP
ca.pfv.spmf.algorithms.frequentpatterns.two_phase

Class ItemsetsTP



  • public class ItemsetsTP
    extends java.lang.Object
    This class represents a set of high utility itemsets found by the Two-Phase algorithm. They are ordered by size. For example, "level 1" means the itemsets of size 1 (containing 1 item).
    See Also:
    ItemsetTP, AlgoTwoPhase
    • Constructor Summary

      Constructors 
      Constructor and Description
      ItemsetsTP(java.lang.String name)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addItemset(ItemsetTP itemset, int k)
      Add an itemset to these itemsets.
      void decreaseCount()
      Decrease the total number of itemsets by 1.
      int getItemsetsCount()
      Get the total number of itemsets.
      java.util.List<java.util.List<ItemsetTP>> getLevels()
      Get the itemsets stored in this structure as a List of List where position i contains the list of itemsets of size i.
      void printItemsets(int transactionCount)
      Print all itemsets to System.out
      void saveResultsToFile(java.lang.String output, int transactionCount)
      Save the itemsets to the file
      • Methods inherited from class java.lang.Object

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

      • ItemsetsTP

        public ItemsetsTP(java.lang.String name)
        Constructor.
        Parameters:
        name - a name to give to these itemsets
    • Method Detail

      • printItemsets

        public void printItemsets(int transactionCount)
        Print all itemsets to System.out
        Parameters:
        transactionCount - the number of transaction in the database
      • saveResultsToFile

        public void saveResultsToFile(java.lang.String output,
                                      int transactionCount)
                               throws java.io.IOException
        Save the itemsets to the file
        Parameters:
        output - the output file path
        transactionCount - the number of transactions in the database
        Throws:
        java.io.IOException - exception if error while writing the file
      • addItemset

        public void addItemset(ItemsetTP itemset,
                               int k)
        Add an itemset to these itemsets.
        Parameters:
        itemset - the itemset to be added
        k - the size of the itemset
      • getLevels

        public java.util.List<java.util.List<ItemsetTP>> getLevels()
        Get the itemsets stored in this structure as a List of List where position i contains the list of itemsets of size i.
        Returns:
        the itemsets.
      • getItemsetsCount

        public int getItemsetsCount()
        Get the total number of itemsets.
        Returns:
        the itemset count.
      • decreaseCount

        public void decreaseCount()
        Decrease the total number of itemsets by 1.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.