ca.pfv.spmf.algorithms.sequential_rules.topseqrules_and_tns
Class AlgoTNS
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequential_rules.topseqrules_and_tns.AlgoTNS
-
public class AlgoTNS extends java.lang.ObjectThis is the original implementation of the TNS algorithm for mining Top-K non redundant sequential rules. It is described in this paper:
Fournier-Viger, P., Tseng, V. S. (2013). TNS: Mining Top-K Non-Redundant Sequential Rules. Proc. 28th Symposium on Applied Computing (ACM SAC 2013). ACM Press, pp. 164-166.
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 AlgoTNS()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, int delta)The main method to run the algorithmvoidwriteResultTofile(java.lang.String path)Write the result found 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, int delta)
The main method to run the algorithm- Parameters:
k- : the chosen value of kdatabase- : a sequence databaseminConfidence- : the minimum confidence thresholddelta- : the chosen value of delta- Returns:
- a redblacktree containing the approximate top-k nonredundant sequential rules
-
writeResultTofile
public void writeResultTofile(java.lang.String path) throws java.io.IOExceptionWrite the result found 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.
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG