ca.pfv.spmf.algorithms.frequentpatterns.apriori_rare
Class AlgoAprioriRare
- java.lang.Object
-
- ca.pfv.spmf.algorithms.frequentpatterns.apriori_rare.AlgoAprioriRare
-
public class AlgoAprioriRare extends java.lang.ObjectThis is an implementation of the AprioriRare algorithm as described by :
Towards Rare Itemset Mining. Szathmary, L., Napoli, A. and Valtchev, P. In Proc. of the 19th IEEE Intl. Conf. on Tools with Artificial Intelligence (ICTAI '07), pages 305-312, Patras, Greece, Oct 2007.
and the original Apriori artice:
Agrawal R, Srikant R. "Fast Algorithms for Mining Association Rules", VLDB. Sep 12-15 1994, Chile, 487-99,
The AprioriRare algorithm finds all minimal rare itemsets.
This is an optimized version that saves the result to a file or keep it into memory if no output path is provided by the user to the runAlgorithm() method.
-
-
Constructor Summary
Constructors Constructor and Description AlgoAprioriRare()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description intgetDatabaseSize()Return the number of transactions in the last database read by the algorithm.voidprintStats()Print statistics about the algorithm execution to System.out.ItemsetsrunAlgorithm(double minsup, java.lang.String input, java.lang.String output)Method to run the algorithm
-
-
-
Method Detail
-
runAlgorithm
public Itemsets runAlgorithm(double minsup, java.lang.String input, java.lang.String output) throws java.io.IOException
Method to run the algorithm- Parameters:
minsup- a minimum support value as a percentageinput- the path of an input fileoutput- the path of an input if the result should be saved to a file. If null, the result will be kept into memory and this method will return the result.- Throws:
java.io.IOException- exception if error while writting or reading the input/output file
-
getDatabaseSize
public int getDatabaseSize()
Return the number of transactions in the last database read by the algorithm.- Returns:
- the number of transactions
-
printStats
public void printStats()
Print statistics about the algorithm execution to System.out.
-
-
DMelt 3.0 © DataMelt by jWork.ORG