ca.pfv.spmf.algorithms.frequentpatterns.charm
Class AlgoCharm_Bitset
- java.lang.Object
-
- ca.pfv.spmf.algorithms.frequentpatterns.charm.AlgoCharm_Bitset
-
- Direct Known Subclasses:
- AlgoDCharm_Bitset
public class AlgoCharm_Bitset extends java.lang.ObjectThis is a new implementation of the CHARM algorithm (2014) that relies on bitsets to implement tidsets. Charm was proposed by ZAKI (2001).
See this article for details about CHARM:
Zaki, M. J., & Hsiao, C. J. (2002). CHARM: An Efficient Algorithm for Closed Itemset Mining. In SDM (Vol. 2, pp. 457-473).
This version saves the result to a file or keep it into memory if no output path is provided by the user to the runAlgorithm method().- See Also:
TriangularMatrix,TransactionDatabase,Itemset,Itemsets
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description classAlgoCharm_Bitset.BitSetSupportAnonymous inner class to store a bitset and its cardinality.
-
Constructor Summary
Constructors Constructor and Description AlgoCharm_Bitset()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description ItemsetsgetClosedItemsets()Get the set of frequent itemsets.voidprintStats()Print statistics about the algorithm execution to System.out.ItemsetsrunAlgorithm(java.lang.String output, TransactionDatabase database, double minsup, boolean useTriangularMatrixOptimization, int hashTableSize)Run the algorithm and save the output to a file or keep it into memory.
-
-
-
Method Detail
-
runAlgorithm
public Itemsets runAlgorithm(java.lang.String output, TransactionDatabase database, double minsup, boolean useTriangularMatrixOptimization, int hashTableSize) throws java.io.IOException
Run the algorithm and save the output to a file or keep it into memory.- Parameters:
database- a transaction databaseoutput- an output file path for writing the result or if null the result is saved into memory and returnedminsup- the minimum supportuseTriangularMatrixOptimization- if true the triangular matrix optimization will be applied.hashTableSize- the size of the hashtable (e.g. 10,000).- Returns:
- the set of closed itemsets found if the result is kept into memory or null otherwise.
- Throws:
java.io.IOException- exception if error while writing the file.
-
printStats
public void printStats()
Print statistics about the algorithm execution to System.out.
-
getClosedItemsets
public Itemsets getClosedItemsets()
Get the set of frequent itemsets.- Returns:
- the frequent itemsets (Itemsets).
-
-
DMelt 3.0 © DataMelt by jWork.ORG