Class TotalSupportTree

java.lang.Object
smile.association.TotalSupportTree
All Implemented Interfaces:
Iterable<ItemSet>

public class TotalSupportTree extends Object implements Iterable<ItemSet>
Total support tree is a kind of compressed set enumeration tree so that we can generate association rules in a storage efficient way.

References

  1. Frans Coenen, Paul Leng, and Shakil Ahmed. Data Structure for Association Rule Mining: T-Trees and P-Trees. IEEE TRANSACTIONS ON KNOWLEDGE AND DATA ENGINEERING, 16(6):774-778, 2004.
  • Constructor Details

    • TotalSupportTree

      public TotalSupportTree(FPTree tree)
      Constructor.
      Parameters:
      tree - FP-tree of transactions.
  • Method Details

    • size

      public int size()
      Returns the number transactions in the database.
      Returns:
      the number transactions in the database.
    • root

      public TotalSupportTree.Node root()
      Returns the root node.
      Returns:
      the root node.
    • iterator

      public Iterator<ItemSet> iterator()
      Specified by:
      iterator in interface Iterable<ItemSet>
    • getSupport

      public int getSupport(int[] itemset)
      Returns the support value for the given item set.
      Parameters:
      itemset - the given item set. The items in the set has to be in the descending order according to their frequency.
      Returns:
      the support value (0 if not found)
    • stream

      public Stream<ItemSet> stream()
      Mines the frequent item sets.
      Returns:
      the stream of frequent item sets