public class RuleItem extends java.lang.Object implements java.lang.Comparable, java.io.Serializable, RevisionHandler
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
getRevision()
Returns the revision string.
|
ItemSet |
premise()
Gets the premise of a rule
|
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 probablilitiespublic 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 comparepublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- RuleItem to comparepublic double accuracy()
public ItemSet premise()
public ItemSet consequence()
public java.lang.String getRevision()
getRevision
in interface RevisionHandler