wpi.associations.arminer
Class ARMinerApriori
java.lang.Object
wpi.associations.arminer.ARMinerApriori
- All Implemented Interfaces:
- LargeItemsetsFinder
- public class ARMinerApriori
- extends java.lang.Object
- implements LargeItemsetsFinder
Apriori.java
This class implements the Apriori algorithm
for finding large itemsets.
(see "Fast Algorithms for Mining Association Rules"
by Rakesh Agrawal and Ramakrishnan Srikant
from IBM Almaden Research Center 1994)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INITIAL_CAPACITY
private static final int INITIAL_CAPACITY
- See Also:
- Constant Field Values
candidates
private java.util.Vector candidates
k_frequent
private java.util.Vector k_frequent
large
private java.util.Vector large
ht_candidates
private HashTree ht_candidates
ht_k_frequent
private HashTree ht_k_frequent
pass_num
private int pass_num
db_reader
private DBReader db_reader
cache_writer
private DBCacheWriter cache_writer
num_rows
private long num_rows
min_weight
private long min_weight
ARMinerApriori
public ARMinerApriori()
findLargeItemsets
public int findLargeItemsets(DBReader dbReader,
DBCacheWriter cacheWriter,
float minSupport)
- Find the frequent itemsets in a database
- Specified by:
findLargeItemsets
in interface LargeItemsetsFinder
- Parameters:
dbReader
- the object used to read from the databasecacheWriter
- the object used to write to the cache
if this is null, then nothing will be saved, this is useful
for benchmarkingminSupport
- the minimum support
- Returns:
- the number of passes executed over the database
weighCandidates
private void weighCandidates()
evaluateCandidates
private void evaluateCandidates()
generateCandidates
private void generateCandidates()
getCandidate
private boolean getCandidate(int i,
int j)