|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.associations.RuleItem
Class for storing an (class) association rule. The premise and the consequence are stored each as separate item sets. For every rule their expected predictive accuracy and the time of generation is stored. These two measures allow to introduce a sort order for rules.
Constructor Summary | |
RuleItem()
Constructor for an empty RuleItem |
|
RuleItem(ItemSet premise,
ItemSet consequence,
int genTime,
int ruleSupport,
double[] m_midPoints,
java.util.Hashtable m_priors)
Constructor |
|
RuleItem(RuleItem toCopy)
Constructor that generates a RuleItem out of a given one |
Method Summary | |
double |
accuracy()
Gets the expected predictive accuracy of a rule |
int |
compareTo(java.lang.Object o)
compares two RuleItems and allows an ordering concerning expected predictive accuracy and time of generation Note: this class has a natural ordering that is inconsistent with equals |
ItemSet |
consequence()
Gets the consequence of a rule |
boolean |
equals(java.lang.Object o)
returns whether two RuleItems are equal |
RuleItem |
generateRuleItem(ItemSet premise,
ItemSet consequence,
Instances instances,
int genTime,
int minRuleCount,
double[] m_midPoints,
java.util.Hashtable m_priors)
Constructs a new RuleItem if the support of the given rule is above the support threshold. |
ItemSet |
premise()
Gets the premise of a rule |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RuleItem()
public RuleItem(RuleItem toCopy)
toCopy
- RuleItem to copypublic RuleItem(ItemSet premise, ItemSet consequence, int genTime, int ruleSupport, double[] m_midPoints, java.util.Hashtable m_priors)
premise
- the premise of the future RuleItemconsequence
- the consequence of the future RuleItemgenTime
- the time of generation of the future RuleItemruleSupport
- support of the rulem_midPoints
- the mid poitns of the intervalsm_priors
- Hashtable containing the estimated prior probablilitiesMethod Detail |
public RuleItem generateRuleItem(ItemSet premise, ItemSet consequence, Instances instances, int genTime, int minRuleCount, double[] m_midPoints, java.util.Hashtable m_priors)
premise
- the premiseconsequence
- the consequenceinstances
- the instancesgenTime
- the time of generation of the current premise and consequenceminRuleCount
- the support thresholdm_midPoints
- the mid points of the intervalsm_priors
- the estimated priori probabilities (in a hashtable)
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
o
- RuleItem to compare
public boolean equals(java.lang.Object o)
o
- RuleItem to compare
public double accuracy()
public ItemSet premise()
public ItemSet consequence()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |