|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.associations.RuleGeneration
weka.associations.CaRuleGeneration
Class implementing the rule generation procedure of the predictive apriori algorithm for class association rules. For association rules in gerneral the method is described in: T. Scheffer (2001). Finding Association Rules That Trade Support Optimally against Confidence. Proc of the 5th European Conf. on Principles and Practice of Knowledge Discovery in Databases (PKDD'01), pp. 424-435. Freiburg, Germany: Springer-Verlag.
The implementation follows the paper expect for adding a rule to the output of the n<\i> best rules. A rule is added if: the expected predictive accuracy of this rule is among the n<\i> best and it is not subsumed by a rule with at least the same expected predictive accuracy (out of an unpublished manuscript from T. Scheffer).
Constructor Summary | |
CaRuleGeneration(ItemSet itemSet)
Constructor |
Method Summary | |
static boolean |
aSubsumesB(RuleItem a,
RuleItem b)
Methods that decides whether or not rule a subsumes rule b. |
java.util.TreeSet |
generateRules(int numRules,
double[] midPoints,
java.util.Hashtable priors,
double expectation,
Instances instances,
java.util.TreeSet best,
int genTime)
Generates all rules for an item set. |
static FastVector |
singleConsequence(Instances instances)
generates a consequence of length 1 for a class association rule. |
static FastVector |
singletons(Instances instances)
Converts the header info of the given set of instances into a set of item sets (singletons). |
Methods inherited from class weka.associations.RuleGeneration |
binomialDistribution, change, count, expectation, removeRedundant, singleConsequence |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public CaRuleGeneration(ItemSet itemSet)
itemSet
- the item set that forms the premise of the ruleMethod Detail |
public java.util.TreeSet generateRules(int numRules, double[] midPoints, java.util.Hashtable priors, double expectation, Instances instances, java.util.TreeSet best, int genTime)
generateRules
in class RuleGeneration
numRules
- the number of association rules the use wants to mine.
This number equals the size n<\i> of the list of the
best rules.midPoints
- the mid points of the intervalspriors
- Hashtable that contains the prior probabilitiesexpectation
- the minimum value of the expected predictive accuracy
that is needed to get into the list of the best rulesinstances
- the instances for which association rules are generatedbest
- the list of the n<\i> best rules.
The list is implemented as a TreeSetgenTime
- the maximum time of generation
public static boolean aSubsumesB(RuleItem a, RuleItem b)
a
- an association rule stored as a RuleItemb
- an association rule stored as a RuleItem
public static FastVector singletons(Instances instances) throws java.lang.Exception
instances
- the set of instances whose header info is to be used
java.lang.Exception
- if singletons can't be generated successfullypublic static FastVector singleConsequence(Instances instances)
instances
- the instances under consideration
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |