ca.pfv.spmf.algorithms.frequentpatterns.vme
Class AlgoVME
- java.lang.Object
-
- ca.pfv.spmf.algorithms.frequentpatterns.vme.AlgoVME
-
public class AlgoVME extends java.lang.ObjectThis is an implementation of the VME algorithm (Deng and Xu, 2011) for erasable itemset mining.
The VME algorithm finds all the ereasable itemsets from a product database.
Actually, this algorithms is a only slight modification of the AprioriTID algorithm.
I have implemented mostly as described in the paper with some modifications to make it more efficient.
First, the authors suggested to generate all candidates of a level before removing the unereasable ones. This is inefficient. Instead, in my implementation, I check the "gain" (loss of profit) directly after generating a candidate so I can eliminate them right away.
Second, it is unecessary to check the subsets like the authors suggest because they use a vertical representation.
Third, the authors suggest to store the profit of transactions in PID List. This is not memory efficient. For implementation it is better to store the profit of each transaction only once in a hashtable.- See Also:
Itemset
-
-
Constructor Summary
Constructors Constructor and Description AlgoVME()Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidprintStats()Print statistics about the latest execution to System.out.voidrunAlgorithm(java.lang.String input, java.lang.String output, double threshold)Run the VME algorithm.
-
-
-
Method Detail
-
runAlgorithm
public void runAlgorithm(java.lang.String input, java.lang.String output, double threshold) throws java.lang.NumberFormatException, java.io.IOExceptionRun the VME algorithm.- Parameters:
input- path to an input fileoutput- path to be used for writing the output filethreshold- the threshold chosen by the user.- Throws:
java.io.IOException- exception if error reading/writing filesjava.lang.NumberFormatException
-
printStats
public void printStats()
Print statistics about the latest execution to System.out.
-
-
DMelt 3.0 © DataMelt by jWork.ORG