类 CaRuleGeneration
java.lang.Object
weka.associations.RuleGeneration
weka.associations.CaRuleGeneration
- 所有已实现的接口:
Serializable
,RevisionHandler
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 best rules. A rule is added if: the expected predictive accuracy of this rule is among the n 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).
- 版本:
- $Revision: 1.4 $
- 作者:
- Stefan Mutter (mutter@cs.waikato.ac.nz)
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static boolean
aSubsumesB
(RuleItem a, RuleItem b) Methods that decides whether or not rule a subsumes rule b.generateRules
(int numRules, double[] midPoints, Hashtable priors, double expectation, Instances instances, TreeSet best, int genTime) Generates all rules for an item set.Returns the revision string.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).从类继承的方法 weka.associations.RuleGeneration
binomialDistribution, change, count, expectation, removeRedundant, singleConsequence
-
构造器详细资料
-
CaRuleGeneration
Constructor- 参数:
itemSet
- the item set that forms the premise of the rule
-
-
方法详细资料
-
generateRules
public TreeSet generateRules(int numRules, double[] midPoints, Hashtable priors, double expectation, Instances instances, TreeSet best, int genTime) Generates all rules for an item set. The item set is the premise.- 覆盖:
generateRules
在类中RuleGeneration
- 参数:
numRules
- the number of association rules the use wants to mine. This number equals the size n 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 best rules. The list is implemented as a TreeSetgenTime
- the maximum time of generation- 返回:
- all the rules with minimum confidence for the given item set
-
aSubsumesB
Methods that decides whether or not rule a subsumes rule b. The defintion of subsumption is: Rule a subsumes rule b, if a subsumes b AND a has got least the same expected predictive accuracy as b.- 参数:
a
- an association rule stored as a RuleItemb
- an association rule stored as a RuleItem- 返回:
- true if rule a subsumes rule b or false otherwise.
-
singletons
Converts the header info of the given set of instances into a set of item sets (singletons). The ordering of values in the header file determines the lexicographic order.- 参数:
instances
- the set of instances whose header info is to be used- 返回:
- a set of item sets, each containing a single item
- 抛出:
Exception
- if singletons can't be generated successfully
-
singleConsequence
generates a consequence of length 1 for a class association rule.- 参数:
instances
- the instances under consideration- 返回:
- FastVector with consequences of length 1
-
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 覆盖:
getRevision
在类中RuleGeneration
- 返回:
- the revision
-