ca.pfv.spmf.algorithms.associationrules.MNRRules
Class AlgoMNRRules
- java.lang.Object
-
- ca.pfv.spmf.algorithms.associationrules.MNRRules.AlgoMNRRules
-
public class AlgoMNRRules extends java.lang.ObjectThis is an implementation of an algorithm for finding the set of Minimum Non Redundant rules (MNR) from a transaction database.
This set is defined as the set of association rules of the form P1 ==> P2 / P1, where P1 is a generator of P2, P2 is a closed itemset, and the rule has a support and confidence respectively no less than minsup and minconf.
See the following publication for more details:
M. Kryszkiewicz. Representative Association Rules. In PAKDD '98: Proceedings of the Second Pacic-Asia Conference on Research and Development in Knowledge Discovery and Data Mining, pages 198209, London, UK, 1998. Springer-Verlag.
Here, the implementation is based on the description in Szathmary's thesis (2006). The algorithm proceed by exploiting the generators and closed itemset found by the Zart algorithm.
This algorithm can save the result to a file or keep it into memory if the user gives a null output path to the runAlgorithm() method.
-
-
Constructor Summary
Constructors Constructor and Description AlgoMNRRules()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidprintStatistics()Print statistics about the algorithm execution to System.out.RulesrunAlgorithm(java.lang.String outputFilePath, double minconf, TZTableClosed closedPatternsAndGenerators, int databaseSize)Run the algorithm.
-
-
-
Method Detail
-
runAlgorithm
public Rules runAlgorithm(java.lang.String outputFilePath, double minconf, TZTableClosed closedPatternsAndGenerators, int databaseSize) throws java.io.IOException
Run the algorithm.- Parameters:
closedPatternsAndGenerators- Closed itemsets and their associated generators.databaseSize- the number of transactions in the transaction database.minconf- minimum confidence thresholdoutputFilePath- the output file path, if the results should be saved to a file. if null, the result are saved in memory and returned by this method.- Returns:
- if the user chose to save to memory, this methods return the set of IGB association rules, otherwise, the result is saved to the output file chosen by the user.
- Throws:
java.io.IOException
-
printStatistics
public void printStatistics()
Print statistics about the algorithm execution to System.out.
-
-
DMelt 3.0 © DataMelt by jWork.ORG