ca.pfv.spmf.algorithms.sequential_rules.cmrules
Class AlgoCMRules
- java.lang.Object
-
- ca.pfv.spmf.algorithms.sequential_rules.cmrules.AlgoCMRules
-
public class AlgoCMRules extends java.lang.ObjectThe CMRules algorithm for mining sequential rules common to several sequences.
This algorithm is described in:
Fournier-Viger, P., Faghihi, U., Nkambou, R. & Mephu Nguifo, E. (2010). CMRules: An Efficient Algorithm for Mining Sequential Rules Common to Several Sequences. Proceedings of the 23th International Florida Artificial Intelligence Research Society Conference (FLAIRS 2010). AAAI press.
This implementation use a modified AprioriTID algorithm for generating association rules in phase 1.
-
-
Field Summary
Fields Modifier and Type Field and Description intminCSupRelativedoubleminSeqConfidence
-
Constructor Summary
Constructors Constructor and Description AlgoCMRules()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidprintStats()Print statistics about the latest algorithm execution.voidrunAlgorithm(int relativeSupport, double minConfidence, java.lang.String input, java.lang.String output)Run the algorithm with the minsup parameter as a number of sequences (integer).voidrunAlgorithm(java.lang.String input, java.lang.String output, double absoluteMinSupport, double minConfidence)Run the algorithm with the minsup parameter as a percentage value (double).voidsetMaxLeftSize(int maxLeftSize)Set the maximum antecedent size constraint for rules to be found.voidsetMaxRightSize(int maxRightSize)Set the maximum consequent size constraint for rules to be found.voidsetMinLeftSize(int minLeftSize)Set the minimum antecedent size constraint for rules to be found.voidsetMinRightSize(int minRightSize)Set the minimum consequent size constraint for rules to be found.
-
-
-
Field Detail
-
minCSupRelative
public int minCSupRelative
-
minSeqConfidence
public double minSeqConfidence
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm(java.lang.String input, java.lang.String output, double absoluteMinSupport, double minConfidence) throws java.io.IOExceptionRun the algorithm with the minsup parameter as a percentage value (double).- Parameters:
input- input file containing a sequence database.output- the file path for writing the resultabsoluteMinSupport- the minsup is a percentage value (ex.: 0.05 = 5 % of all sequences in the database)minConfidence- the minimum confidence threshold- Throws:
java.io.IOException- exception if error while writing the output file.
-
runAlgorithm
public void runAlgorithm(int relativeSupport, double minConfidence, java.lang.String input, java.lang.String output) throws java.io.IOExceptionRun the algorithm with the minsup parameter as a number of sequences (integer).- Parameters:
input- input file containing a sequence database.output- the file path for writing the resultrelativeSupport- the minsup is a number of sequences (ex.: 5 = 5 sequences of the database)minConfidence- the minimum confidence threshold- Throws:
java.io.IOException- exception if error while writing the output file.
-
printStats
public void printStats()
Print statistics about the latest algorithm execution.
-
setMinLeftSize
public void setMinLeftSize(int minLeftSize)
Set the minimum antecedent size constraint for rules to be found.- Parameters:
minLeftSize- an integer
-
setMaxLeftSize
public void setMaxLeftSize(int maxLeftSize)
Set the maximum antecedent size constraint for rules to be found.- Parameters:
maxLeftSize- an integer
-
setMinRightSize
public void setMinRightSize(int minRightSize)
Set the minimum consequent size constraint for rules to be found.- Parameters:
minRightSize- an integer
-
setMaxRightSize
public void setMaxRightSize(int maxRightSize)
Set the maximum consequent size constraint for rules to be found.- Parameters:
maxRightSize- an integer
-
-
DMelt 3.0 © DataMelt by jWork.ORG