类 RuleItem

java.lang.Object
weka.associations.RuleItem
所有已实现的接口:
Serializable, Comparable, RevisionHandler

public class RuleItem extends Object implements Comparable, Serializable, RevisionHandler
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.
版本:
$Revision: 1.5 $
作者:
Stefan Mutter
另请参阅:
  • 构造器详细资料

    • RuleItem

      public RuleItem()
      Constructor for an empty RuleItem
    • RuleItem

      public RuleItem(RuleItem toCopy)
      Constructor that generates a RuleItem out of a given one
      参数:
      toCopy - RuleItem to copy
    • RuleItem

      public RuleItem(ItemSet premise, ItemSet consequence, int genTime, int ruleSupport, double[] m_midPoints, Hashtable m_priors)
      Constructor
      参数:
      premise - the premise of the future RuleItem
      consequence - the consequence of the future RuleItem
      genTime - the time of generation of the future RuleItem
      ruleSupport - support of the rule
      m_midPoints - the mid poitns of the intervals
      m_priors - Hashtable containing the estimated prior probablilities
  • 方法详细资料

    • generateRuleItem

      public 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.
      参数:
      premise - the premise
      consequence - the consequence
      instances - the instances
      genTime - the time of generation of the current premise and consequence
      minRuleCount - the support threshold
      m_midPoints - the mid points of the intervals
      m_priors - the estimated priori probabilities (in a hashtable)
      返回:
      a RuleItem if its support is above the threshold, null otherwise
    • compareTo

      public 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
      指定者:
      compareTo 在接口中 Comparable
      参数:
      o - RuleItem to compare
      返回:
      integer indicating the sort oder of the two RuleItems
    • equals

      public boolean equals(Object o)
      returns whether two RuleItems are equal
      覆盖:
      equals 在类中 Object
      参数:
      o - RuleItem to compare
      返回:
      true if the rules are equal, false otherwise
    • accuracy

      public double accuracy()
      Gets the expected predictive accuracy of a rule
      返回:
      the expected predictive accuracy of a rule stored as a RuleItem
    • premise

      public ItemSet premise()
      Gets the premise of a rule
      返回:
      the premise of a rule stored as a RuleItem
    • consequence

      public ItemSet consequence()
      Gets the consequence of a rule
      返回:
      the consequence of a rule stored as a RuleItem
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      返回:
      the revision