public class Sequence extends java.lang.Object implements java.lang.Cloneable, java.io.Serializable, RevisionHandler
Constructor and Description |
---|
Sequence()
Constructor.
|
Sequence(FastVector elements)
Constructor accepting a set of elements as parameter.
|
Sequence(int supportCount)
Constructor accepting an int value as parameter to set the support count.
|
Modifier and Type | Method and Description |
---|---|
static FastVector |
aprioriGen(FastVector kMinusOneSequences)
Generates all possible candidate k-Sequences and prunes the ones that
contain an infrequent (k-1)-Sequence.
|
Sequence |
clone()
Returns a deep clone of a Sequence.
|
static FastVector |
deleteInfrequentSequences(FastVector sequences,
long minSupportCount)
Deletes Sequences of a given set which don't meet the minimum support
count threshold.
|
boolean |
equals(java.lang.Object obj)
Checks if two Sequences are equal.
|
java.lang.String |
getRevision()
Returns the revision string.
|
static FastVector |
oneElementsToSequences(FastVector elements)
Converts a set of 1-Elements into a set of 1-Sequences.
|
static void |
printSetOfSequences(FastVector setOfSequences)
Prints a set of Sequences as String output.
|
static java.lang.String |
setOfSequencesToString(FastVector setOfSequences,
Instances dataSet,
FastVector filterAttributes)
Returns a String representation of a set of Sequences where the numeric
value of each event/item is represented by its respective nominal value.
|
java.lang.String |
toNominalString(Instances dataSet)
Returns a String representation of a Sequences where the numeric value
of each event/item is represented by its respective nominal value.
|
java.lang.String |
toString()
Returns a String representation of a Sequence.
|
static void |
updateSupportCount(FastVector candidates,
FastVector dataSequences)
Updates the support count of a set of Sequence candidates according to a
given set of data sequences.
|
public Sequence()
public Sequence(FastVector elements)
elements
- the Elements of the Sequencepublic Sequence(int supportCount)
supportCount
- the support count to setpublic static FastVector aprioriGen(FastVector kMinusOneSequences) throws java.lang.CloneNotSupportedException
kMinusOneSequences
- the set of (k-1)-Sequences, used for verificationjava.lang.CloneNotSupportedException
public static FastVector deleteInfrequentSequences(FastVector sequences, long minSupportCount)
sequences
- the set Sequences to be checkedminSupportCount
- the minimum support countpublic static FastVector oneElementsToSequences(FastVector elements)
elements
- the set of 1-Elementspublic static void printSetOfSequences(FastVector setOfSequences)
setOfSequences
- the set of sequencespublic static java.lang.String setOfSequencesToString(FastVector setOfSequences, Instances dataSet, FastVector filterAttributes)
setOfSequences
- the set of SequencesdataSet
- the corresponding data set containing the header
informationfilterAttributes
- the attributes to filter outpublic static void updateSupportCount(FastVector candidates, FastVector dataSequences)
candidates
- the set of candidatesdataSequences
- the set of data sequencespublic Sequence clone()
clone
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toNominalString(Instances dataSet)
dataSet
- the corresponding data set containing the header
informationpublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getRevision()
getRevision
in interface RevisionHandler