public class RuleItem extends Object implements Comparable, Serializable, RevisionHandler
| Constructor and Description |
|---|
RuleItem()
Constructor for an empty RuleItem
|
RuleItem(ItemSet premise,
ItemSet consequence,
int genTime,
int ruleSupport,
double[] m_midPoints,
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(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(Object o)
returns whether two RuleItems are equal
|
RuleItem |
generateRuleItem(ItemSet premise,
ItemSet consequence,
Instances instances,
int genTime,
int minRuleCount,
double[] m_midPoints,
Hashtable m_priors)
Constructs a new RuleItem if the support of the given rule is above the support threshold.
|
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, 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, 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(Object o)
compareTo in interface Comparableo - RuleItem to comparepublic boolean equals(Object o)
public double accuracy()
public ItemSet premise()
public ItemSet consequence()
public String getRevision()
getRevision in interface RevisionHandlerCopyright © 2021 University of Waikato, Hamilton, NZ. All rights reserved.