Class FPTree


  • public class FPTree
    extends java.lang.Object
    This is an implementation of a FPTree as used by the FPGrowth algorithm.
    Author:
    Philippe Fournier-Viger
    See Also:
    FPNode, Itemset, AlgoFPGrowth
    • Constructor Summary

      Constructors 
      Constructor Description
      FPTree()
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addTransaction​(java.util.List<java.lang.Integer> transaction, int i)
      Method for adding a transaction to the fp-tree (for the initial construction of the FP-Tree).
      void createHeaderList​(java.util.Map<java.lang.Integer,​java.lang.Integer> mapSupport)
      Method for creating the list of items in the header table, in descending order of support.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • headerList

        public java.util.List<java.lang.Integer> headerList
      • mapItemNodes

        public java.util.Map<java.lang.Integer,​FPNode> mapItemNodes
    • Constructor Detail

      • FPTree

        public FPTree()
        Constructor
    • Method Detail

      • addTransaction

        public void addTransaction​(java.util.List<java.lang.Integer> transaction,
                                   int i)
        Method for adding a transaction to the fp-tree (for the initial construction of the FP-Tree).
        Parameters:
        transaction -
        i -
      • createHeaderList

        public void createHeaderList​(java.util.Map<java.lang.Integer,​java.lang.Integer> mapSupport)
        Method for creating the list of items in the header table, in descending order of support.
        Parameters:
        mapSupport - the frequencies of each item (key: item value: support)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object