ca.pfv.spmf.algorithms.sequential_rules.topseqrules_and_tns
Class AlgoTopSeqRules
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequential_rules.topseqrules_and_tns.AlgoTopSeqRules
-
public class AlgoTopSeqRules extends java.lang.ObjectThis is the original implementation of the TopSeqRule algorithm for mining Top-K sequential rules. It is described in this paper:
Fournier-Viger, P. & Tseng, V. S. (2011). Mining Top-K Sequential Rules. Proceedings of the 7th Intern. Conf. on Advanced Data Mining and Applications (ADMA 2011). LNAI 7121, Springer, pp.180-194.
The implementation use the red-black tree data structure for storing the current top-k rules during the mining process and the top-k candidate for exploration (see details in the paper).- See Also:
RedBlackTree,Sequence,SequenceDatabase
-
-
Constructor Summary
Constructors Constructor and Description AlgoTopSeqRules()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetTotalTime()Get the total runtime of the last execution.voidprintStats()Print statistics about the last algorithm execution to System.out.RedBlackTree<Rule>runAlgorithm(int k, SequenceDatabase database, double minConfidence)The main method to run the algorithmvoidwriteResultTofile(java.lang.String path)Write the result by the last execution of the method "runAlgorithm" to an output file
-
-
-
Method Detail
-
runAlgorithm
public RedBlackTree<Rule> runAlgorithm(int k, SequenceDatabase database, double minConfidence)
The main method to run the algorithm- Parameters:
k- : the chosen value of kdatabase- : a sequence databaseminConfidence- : the minimum confidence threshold- Returns:
- a redblacktree containing the top-k sequential rules
-
printStats
public void printStats()
Print statistics about the last algorithm execution to System.out.
-
getTotalTime
public double getTotalTime()
Get the total runtime of the last execution.- Returns:
- the time as a double.
-
writeResultTofile
public void writeResultTofile(java.lang.String path) throws java.io.IOExceptionWrite the result by the last execution of the method "runAlgorithm" to an output file- Parameters:
path- the output file path- Throws:
java.io.IOException- exception if an error occur when writing the file.
-
-
DMelt 3.0 © DataMelt by jWork.ORG