ca.pfv.spmf.algorithms.sequential_rules.cmrules
Class AlgoAprioriTID_forCMRules
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequential_rules.cmrules.AlgoAprioriTID_forCMRules
-
public class AlgoAprioriTID_forCMRules extends java.lang.ObjectThis is an implementation of the AprioriTID algorithm that is modified to be used with the CMRules algorithm. AprioriTID was proposed in:
Agrawal R, Srikant R. "Fast Algorithms for Mining Association Rules", VLDB. Sep 12-15 1994, Chile, 487-99,
The Apriori algorithm finds all the frequents itemsets and their support in a binary context.
-
-
Constructor Summary
Constructors Constructor and Description AlgoAprioriTID_forCMRules(TransactionDatabase database, TriangularMatrix matrix)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ItemsetsgetItemsets()Get the frequent itemsets.ItemsetsrunAlgorithm(int minsuppRelative, java.util.List<java.lang.Integer> listFrequentsSize1, java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> mapItemCount)Run the algorithm.voidsetMaxItemsetSize(int maxItemsetSize)Set the maximum frequent itemset size to be discovered.
-
-
-
Constructor Detail
-
AlgoAprioriTID_forCMRules
public AlgoAprioriTID_forCMRules(TransactionDatabase database, TriangularMatrix matrix)
Constructor- Parameters:
database- the transaction databasematrix- the triangular matrix
-
-
Method Detail
-
runAlgorithm
public Itemsets runAlgorithm(int minsuppRelative, java.util.List<java.lang.Integer> listFrequentsSize1, java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> mapItemCount)
Run the algorithm.- Parameters:
minsuppRelative- the minimum support thresholdlistFrequentsSize1- the list of frequent itemsets of size 1mapItemCount- a map of items (key) and their tidset (value).- Returns:
- the frequent itemsets
-
getItemsets
public Itemsets getItemsets()
Get the frequent itemsets.- Returns:
- an object Itemsets containing the frequent itemsets.
-
setMaxItemsetSize
public void setMaxItemsetSize(int maxItemsetSize)
Set the maximum frequent itemset size to be discovered.- Parameters:
maxItemsetSize- the maximum size as a int.
-
-
DMelt 3.0 © DataMelt by jWork.ORG