ca.pfv.spmf.algorithms.frequentpatterns.aprioriTIDClose
Class AlgoAprioriTIDClose
- java.lang.Object
-
- ca.pfv.spmf.algorithms.frequentpatterns.aprioriTIDClose.AlgoAprioriTIDClose
-
public class AlgoAprioriTIDClose extends java.lang.ObjectThis is an implementation of the AprioriTID algorithm transformed to mine only frequent closed itemsets as proposed by Pasquier (1999), rather than all frequent itemsets.
AprioriTID was originally proposed in :
Agrawal R, Srikant R. "Fast Algorithms for Mining Association Rules", VLDB. Sep 12-15 1994, Chile, 487-99,
Modifying Apriori to mine closed itemsets was proposed in:
Pasquier, N., Bastide, Y., Taouil, R., & Lakhal, L. (1999). Discovering frequent closed itemsets for association rules. In Database TheoryICDT99 (pp. 398-416). Springer Berlin Heidelberg.
This implementation can save the result to a file or keep it into memory if no output path is provided to the runAlgorithm() method.
-
-
Constructor Summary
Constructors Constructor and Description AlgoAprioriTIDClose()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ItemsetsgetFrequentClosed()Get the frequent closed itemsets found by the latest execution.voidprintStats()Print statistics about the algorithm execution to System.out.ItemsetsrunAlgorithm(TransactionDatabase database, double minsupp, java.lang.String outputFile)Run the algorithmvoidsetMaxItemsetSize(int maxItemsetSize)Set the maximum itemset size of itemsets to be found
-
-
-
Method Detail
-
runAlgorithm
public Itemsets runAlgorithm(TransactionDatabase database, double minsupp, java.lang.String outputFile) throws java.io.IOException
Run the algorithm- Parameters:
minsupp- the minsup thresholdoutputFile- an output file path, if the result should be saved otherwise leave it null and this method will keep the result into memory and return it.- Returns:
- the set of itemsets found if the user chose to save the result to memory
- Throws:
java.io.IOException- exception if error writing the output file
-
getFrequentClosed
public Itemsets getFrequentClosed()
Get the frequent closed itemsets found by the latest execution.- Returns:
- Itemsets
-
setMaxItemsetSize
public void setMaxItemsetSize(int maxItemsetSize)
Set the maximum itemset size of itemsets to be found- Parameters:
maxItemsetSize- maximum itemset size.
-
printStats
public void printStats()
Print statistics about the algorithm execution to System.out.
-
-
DMelt 3.0 © DataMelt by jWork.ORG