ca.pfv.spmf.algorithms.frequentpatterns.apriori_HT
Class ItemsetHashTree
- java.lang.Object
-
- ca.pfv.spmf.algorithms.frequentpatterns.apriori_HT.ItemsetHashTree
-
public class ItemsetHashTree extends java.lang.ObjectThis class represents an itemset hash tree as used by the AprioriHT algorithm (a version of Apriori implemented with a hash tree).
In the original Apriori paper it is suggested to not subdivide a node until there is enough itemsets in that node. In this implementations, all nodes are always subdivided.- See Also:
AlgoAprioriHT
-
-
Constructor Summary
Constructors Constructor and Description ItemsetHashTree(int itemsetSize, int branch_count)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidinsertCandidateItemset(Itemset itemset)Inserts an itemset in the hash-treebooleanisInTheTree(int[] itemset, int posRemoved)This method checks if an itemset exists in the tree.voidupdateSupportCount(int[] transaction)This method increase the support count of all itemsets contained in the hash-tree that are contained in a transaction.
-
-
-
Constructor Detail
-
ItemsetHashTree
public ItemsetHashTree(int itemsetSize, int branch_count)Constructor- Parameters:
itemsetSize- the size of the itemsets that will be inserted in the tree
-
-
Method Detail
-
insertCandidateItemset
public void insertCandidateItemset(Itemset itemset)
Inserts an itemset in the hash-tree- Parameters:
itemset- the itemset to be inserted
-
updateSupportCount
public void updateSupportCount(int[] transaction)
This method increase the support count of all itemsets contained in the hash-tree that are contained in a transaction.- Parameters:
transaction- the transaction.
-
isInTheTree
public boolean isInTheTree(int[] itemset, int posRemoved)This method checks if an itemset exists in the tree.- Parameters:
itemset- the itemsetposRemoved- the position of an item that should be ignored in this itemset- Returns:
- true if the itemset appears in the tree
-
-
DMelt 3.0 © DataMelt by jWork.ORG