ca.pfv.spmf.algorithms.sequentialpatterns.spam
Class AlgoSPAM
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequentialpatterns.spam.AlgoSPAM
-
public class AlgoSPAM extends java.lang.ObjectThis is an implementation of the SPAM algorithm.
The SPAM algorithm was originally described in this paper:
Jay Ayres, Johannes Gehrke, Tomi Yiu, and Jason Flannick. Sequential PAttern Mining Using Bitmaps. In Proceedings of the Eighth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining. Edmonton, Alberta, Canada, July 2002.
I tried to do what is indicated in that paper but some optimizations are not described with enough details in the paper. So my implementation does not include these optimizations for example: - lookup tables for bitmaps - compression of bitmaps.- See Also:
Bitmap,Prefix
-
-
Constructor Summary
Constructors Constructor and Description AlgoSPAM()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetMaximumPatternLength()Get the maximum length of patterns to be found (in terms of itemset count)voidprintStatistics()Print the statistics of the algorithm execution to System.out.voidrunAlgorithm(java.lang.String input, java.lang.String outputFilePath, double minsupRel)Method to run the algorithmvoidsetMaximumPatternLength(int maximumPatternLength)Set the maximum length of patterns to be found (in terms of itemset count)
-
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm(java.lang.String input, java.lang.String outputFilePath, double minsupRel) throws java.io.IOExceptionMethod to run the algorithm- Parameters:
input- path to an input fileoutputFilePath- path for writing the output fileminsupRel- the minimum support as a relative value- Throws:
java.io.IOException- exception if error while writing the file or reading
-
printStatistics
public void printStatistics()
Print the statistics of the algorithm execution to System.out.
-
getMaximumPatternLength
public int getMaximumPatternLength()
Get the maximum length of patterns to be found (in terms of itemset count)- Returns:
- the maximumPatternLength
-
setMaximumPatternLength
public void setMaximumPatternLength(int maximumPatternLength)
Set the maximum length of patterns to be found (in terms of itemset count)- Parameters:
maximumPatternLength- the maximumPatternLength to set
-
-
DMelt 3.0 © DataMelt by jWork.ORG