public class GeneralizedSequentialPatterns extends AbstractAssociator implements OptionHandler, TechnicalInformationHandler
@proceedings{Srikant1996, author = {Ramakrishnan Srikant and Rakesh Agrawal}, booktitle = {Advances in Database Technology EDBT '96}, publisher = {Springer}, title = {Mining Sequential Patterns: Generalizations and Performance Improvements}, year = {1996} }Valid options are:
-D If set, algorithm is run in debug mode and may output additional info to the console
-S <minimum support threshold> The miminum support threshold. (default: 0.9)
-I <attribute number representing the data sequence ID The attribute number representing the data sequence ID. (default: 0)
-F <attribute numbers used for result filtering The attribute numbers used for result filtering. (default: -1)
Modifier and Type | Field and Description |
---|---|
protected String |
m_AlgorithmStart
String indicating the starting time of the algorithm.
|
protected FastVector |
m_AllSequentialPatterns
all generated frequent sequences, i.e.
|
protected String |
m_CycleEnd
String indicating the ending time of an cycle.
|
protected int |
m_Cycles
number of cycles performed until termination
|
protected String |
m_CycleStart
String indicating the starting time of an cycle.
|
protected int |
m_DataSeqID
number indicating the attribute holding the data sequence ID
|
protected boolean |
m_Debug
Whether the classifier is run in debug mode.
|
protected String |
m_FilterAttributes
String containing the attribute numbers that are used for result
filtering; -1 means no filtering
|
protected FastVector |
m_FilterAttrVector
Vector containing the attribute numbers that are used for result
filtering; -1 means no filtering
|
protected double |
m_MinSupport
the minimum support threshold
|
protected Instances |
m_OriginalDataSet
original sequential data set to be used for sequential patterns extraction
|
Constructor and Description |
---|
GeneralizedSequentialPatterns()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
buildAssociations(Instances data)
Extracts all sequential patterns out of a given sequential data set and
prints out the results.
|
protected int |
calcFreqSequencesTotal()
Calculates the total number of extracted frequent sequences.
|
String |
dataSeqIDTipText()
Returns the dataSeqID option tip text for the Weka GUI.
|
String |
debugTipText()
Returns the tip text for this property
|
protected FastVector |
extractDataSequences(Instances originalDataSet,
int dataSeqID)
Extracts the data sequences out of the original data set according to
their sequence id attribute, which is removed after extraction.
|
void |
extractFilterAttributes(String attrNumbers)
Parses a given String containing attribute numbers which are used for
result filtering.
|
String |
filterAttributesTipText()
Returns the filterAttributes option tip text for the Weka GUI.
|
protected void |
findFrequentSequences()
The actual method for extracting frequent sequences.
|
String |
getAlgorithmStart()
Returns the time/date string the algorithm was started
|
Capabilities |
getCapabilities()
Returns the Capabilities of the algorithm.
|
String |
getCycleEnd()
Returns the time/date string the cycle ended
|
String |
getCycleStart()
Returns the time/date string the cycle was started
|
int |
getDataSeqID()
Returns the attribute representing the data sequence ID.
|
boolean |
getDebug()
Get whether debugging is turned on.
|
String |
getFilterAttributes()
Returns the String containing the attributes which are used for output
filtering.
|
double |
getMinSupport()
Returns the minimum support threshold.
|
String[] |
getOptions()
Returns an Array containing the current options settings.
|
String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
getTechnicalInformation()
Returns TechnicalInformation about the paper related to the algorithm.
|
protected String |
getTimeAndDate()
Returns the current time and date.
|
String |
globalInfo()
Returns global information about the algorithm.
|
Enumeration |
listOptions()
Returns an enumeration of the available options.
|
static void |
main(String[] args)
Main method.
|
String |
minSupportTipText()
Returns the minimum support option tip text for the Weka GUI.
|
protected void |
resetOptions()
Resets the algorithm's options to the default values.
|
void |
setDataSeqID(int value)
Sets the attribute representing the data sequence ID.
|
void |
setDebug(boolean value)
Set debugging mode.
|
void |
setFilterAttributes(String value)
Sets the String containing the attributes which are used for output
filtering.
|
void |
setMinSupport(double value)
Sets the minimum support threshold.
|
void |
setOptions(String[] options)
Parses a given list of options.
|
String |
toString()
Returns a String containing the result information of the algorithm.
|
forName, makeCopies, makeCopy, runAssociator
protected double m_MinSupport
protected int m_DataSeqID
protected Instances m_OriginalDataSet
protected FastVector m_AllSequentialPatterns
protected int m_Cycles
protected String m_CycleStart
protected String m_CycleEnd
protected String m_AlgorithmStart
protected String m_FilterAttributes
protected FastVector m_FilterAttrVector
protected boolean m_Debug
public GeneralizedSequentialPatterns()
public String globalInfo()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation
in interface TechnicalInformationHandler
public Enumeration listOptions()
listOptions
in interface OptionHandler
public void setOptions(String[] options) throws Exception
-D If set, algorithm is run in debug mode and may output additional info to the console
-S <minimum support threshold> The miminum support threshold. (default: 0.9)
-I <attribute number representing the data sequence ID The attribute number representing the data sequence ID. (default: 0)
-F <attribute numbers used for result filtering The attribute numbers used for result filtering. (default: -1)
setOptions
in interface OptionHandler
options
- the Array containing the optionsException
- if an option is not supportedpublic String[] getOptions()
getOptions
in interface OptionHandler
protected void resetOptions()
public Capabilities getCapabilities()
getCapabilities
in interface Associator
getCapabilities
in interface CapabilitiesHandler
getCapabilities
in class AbstractAssociator
Capabilities
public void buildAssociations(Instances data) throws Exception
buildAssociations
in interface Associator
data
- the original data setException
- if the associator has not been
generated successfullyprotected int calcFreqSequencesTotal()
protected FastVector extractDataSequences(Instances originalDataSet, int dataSeqID)
originalDataSet
- the original data setdataSeqID
- the squence ID to usepublic void extractFilterAttributes(String attrNumbers)
attrNumbers
- the String of attribute numbersprotected void findFrequentSequences() throws CloneNotSupportedException
CloneNotSupportedException
public String dataSeqIDTipText()
public int getDataSeqID()
public void setDataSeqID(int value)
value
- the data sequence ID to setpublic String filterAttributesTipText()
public String getFilterAttributes()
public void setFilterAttributes(String value)
value
- the String containing the attributespublic String minSupportTipText()
public double getMinSupport()
public void setMinSupport(double value)
value
- the minimum support thresholdpublic void setDebug(boolean value)
value
- true if debug output should be printedpublic boolean getDebug()
public String debugTipText()
protected String getTimeAndDate()
public String getAlgorithmStart()
public String getCycleStart()
public String getCycleEnd()
public String toString()
public String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AbstractAssociator
public static void main(String[] args)
args
- commandline options, use -h for helpCopyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.