ca.pfv.spmf.algorithms.associationrules.closedrules
Class AlgoClosedRules
- java.lang.Object
-
- ca.pfv.spmf.algorithms.associationrules.agrawal94_association_rules.AlgoAgrawalFaster94
-
- ca.pfv.spmf.algorithms.associationrules.closedrules.AlgoClosedRules
-
public class AlgoClosedRules extends AlgoAgrawalFaster94
This is an implementation of the "faster algorithm" for generating association rules, described in Agrawal & al. 1994, IBM Research Report RJ9839, June 1994. Here it is adapted for mining closed rules. The main difference with AlgoAgrawalFaster94.java, is that this implementation takes a different type of Itemset object as input. Moreover, the method CALCULATESUPPORT() is different because if an itemset is not closed, we must find its closure to determine its support. To avoid redundancy as much as possible, this class is a subclass of AlgoAgrawalFaster94.java and share several methods.
This implementation saves the result to a file or can alternatively keep it into memory if no output path is provided by the user when the runAlgorithm() method is called.- See Also:
AssocRule,AssocRules
-
-
Constructor Summary
Constructors Constructor and Description AlgoClosedRules()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description AssocRulesrunAlgorithm(Itemsets patterns, java.lang.String output, int databaseSize, double minconf)Run the algorithmAssocRulesrunAlgorithm(Itemsets patterns, java.lang.String output, int databaseSize, double minconf, double minlift)Run the algorithm-
Methods inherited from class ca.pfv.spmf.algorithms.associationrules.agrawal94_association_rules.AlgoAgrawalFaster94
printStats, runAlgorithm, runAlgorithm
-
-
-
-
Method Detail
-
runAlgorithm
public AssocRules runAlgorithm(Itemsets patterns, java.lang.String output, int databaseSize, double minconf) throws java.io.IOException
Run the algorithm- Parameters:
patterns- a set of frequent itemsetsoutput- an output file path for writing the result or null if the user want this method to return the resultdatabaseSize- the number of transactions in the databaseminconf- the minconf threshold- Returns:
- the set of association rules if the user wished to save them into memory
- Throws:
java.io.IOException- exception if error writing to the output file
-
runAlgorithm
public AssocRules runAlgorithm(Itemsets patterns, java.lang.String output, int databaseSize, double minconf, double minlift) throws java.io.IOException
Run the algorithm- Parameters:
patterns- a set of frequent itemsetsoutput- an output file path for writing the result or null if the user want this method to return the resultdatabaseSize- the number of transactions in the databaseminconf- the minconf thresholdminlift- the minlift threshold- Returns:
- the set of association rules if the user wished to save them into memory
- Throws:
java.io.IOException- exception if error writing to the output file
-
-
DMelt 3.0 © DataMelt by jWork.ORG