|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
laur.tools.AbortableThread
laur.tools.MonitoredThread
laur.dm.ar.AssociationsMiner
external.modified.AprioriRules
public class AprioriRules
This class implements the Apriori ap_genrules algorithm for finding association rules.
(see "Fast Algorithms for Mining Association Rules" by Rakesh Agrawal and Ramakrishnan Srikant from IBM Almaden Research Center 1994) We also implement a variant of ap_genrules that generates only rules having the user specified characteristics. The class is a modified version of the FPgrowth class version 1.2 found in laur.dm.ar created by Lurentiu Cristofor. Modifications are marked in the source. Formatting is also slightly changed to follow the java code convention closer.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class laur.dm.ar.AssociationsMiner |
---|
cache_reader, is_ignored, is_in_antecedent, is_in_consequent, max_antecedent, min_confidence, min_consequent, min_support |
Fields inherited from class laur.tools.MonitoredThread |
---|
monitor |
Fields inherited from class laur.tools.AbortableThread |
---|
bAbort, isRunning |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
AprioriRules()
|
Method Summary | |
---|---|
java.util.ArrayList |
findAssociations(java.util.ArrayList itemsets,
double minSupport,
double minConfidence)
MOD: New interface to class needed, as TTM Testbench does not use cacheReader. |
java.util.ArrayList |
findAssociations(laur.dm.ar.DBCacheReader cacheReader,
double minSupport,
double minConfidence)
Find association rules in a database, given the set of frequent itemsets. |
java.util.ArrayList |
findAssociations(laur.dm.ar.DBCacheReader cacheReader,
double minSupport,
double minConfidence,
laur.dm.ar.Itemset inAntecedent,
laur.dm.ar.Itemset inConsequent,
laur.dm.ar.Itemset ignored,
int maxAntecedent,
int minConsequent)
Find association rules in a database, given the set of frequent itemsets and a set of restrictions. |
Methods inherited from class laur.dm.ar.AssociationsMiner |
---|
execute, getResult, setParameters, setParameters |
Methods inherited from class laur.tools.MonitoredThread |
---|
terminationHook |
Methods inherited from class laur.tools.AbortableThread |
---|
abort, checkAbort, run |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AprioriRules()
Method Detail |
---|
public java.util.ArrayList findAssociations(java.util.ArrayList itemsets, double minSupport, double minConfidence)
itemsets
- the object used to read from the cacheminSupport
- the minimum supportminConfidence
- the minimum confidence
public java.util.ArrayList findAssociations(laur.dm.ar.DBCacheReader cacheReader, double minSupport, double minConfidence)
findAssociations
in class laur.dm.ar.AssociationsMiner
cacheReader
- the object used to read from the cacheminSupport
- the minimum supportminConfidence
- the minimum confidence
public java.util.ArrayList findAssociations(laur.dm.ar.DBCacheReader cacheReader, double minSupport, double minConfidence, laur.dm.ar.Itemset inAntecedent, laur.dm.ar.Itemset inConsequent, laur.dm.ar.Itemset ignored, int maxAntecedent, int minConsequent)
findAssociations
in class laur.dm.ar.AssociationsMiner
cacheReader
- the object used to read from the cacheminSupport
- the minimum supportminConfidence
- the minimum confidenceinAntecedent
- the items that must appear in the antecedent
of each rule, if null then this constraint is ignoredinConsequent
- the items that must appear in the consequent
of each rule, if null then this constraint is ignoredignored
- the items that should be ignored,
if null then this constraint is ignoredmaxAntecedent
- the maximum number of items that can appear
in the antecedent of each rule, if 0 then this constraint is ignoredminConsequent
- the minimum number of items that should appear
in the consequent of each rule, if 0 then this constraint is ignored
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |