public class ArrayApriori extends Object implements AprioriAlgorithm
ArrayPrefixTreeNodedata structure to find frequent itemsets. Based on these it constructs a prefix tree. In a prefix tree each child of an item has the path in the tree to that item in common. The path is its prefix. The transactions are processed, for each level once, by going to the node corresponding to first item in the transaction, and process the rest of the transaction for that node. Thus, there is no candidate generation.
|Constructor and Description|
Creates an ArrayApriori instance with the bitset length, corresponding to the number of items.
|Modifier and Type||Method and Description|
Finds the frequent itemsets by going down the tree until the current build level is reached, there it counts those items which are present in the transaction.
Returns the association rules generated from the found frequent itemsets with the passed minimal confidence.
Returns the found frequent itemsets according to their type, which can either be FREE, CLOSED or MAXIMAL.
public ArrayApriori(int bitSetLength, int dbsize)
bitSetLength- the number of items
dbsize- the number of transactions
public void setMinSupport(double minSupport)
minSupport- the minimum support
public void findFrequentItemSets(List<BitVectorValue> transactions, double minSupport, int maxDepth, FrequentItemSet.Type type, ExecutionMonitor exec) throws CanceledExecutionException
transactions- a list of BitSets representing the bitvectors, thus, corresponding to the whole database
minSupport- the minimum support as an absolute value
maxDepth- the maximal length of an itemset
type- the desired type of the frequent itemsets
exec- the execution monitor
CanceledExecutionException- if the execution was cancelled
public List<AssociationRule> getAssociationRules(double confidence)
public List<FrequentItemSet> getFrequentItemSets(FrequentItemSet.Type type)
KNIME GmbH, Konstanz, Germany
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.