类 Rule

java.lang.Object
weka.classifiers.rules.Rule
所有已实现的接口:
Serializable, Copyable, RevisionHandler, WeightedInstancesHandler
直接已知子类:
JRip.RipperRule

public abstract class Rule extends Object implements WeightedInstancesHandler, Copyable, Serializable, RevisionHandler
Abstract class of generic rule
版本:
$Revision: 1.8 $
作者:
Xin Xu (xx5@cs.waikato.ac.nz)
另请参阅:
  • 构造器详细资料

    • Rule

      public Rule()
  • 方法详细资料

    • copy

      public Object copy()
      Get a shallow copy of this rule
      指定者:
      copy 在接口中 Copyable
      返回:
      the copy
    • covers

      public abstract boolean covers(Instance datum)
      Whether the instance covered by this rule
      参数:
      datum - the instance in question
      返回:
      the boolean value indicating whether the instance is covered by this rule
    • grow

      public abstract void grow(Instances data) throws Exception
      Build this rule
      参数:
      data - the data used to build the rule
      抛出:
      Exception - if rule cannot be built
    • hasAntds

      public abstract boolean hasAntds()
      Whether this rule has antecedents, i.e. whether it is a default rule
      返回:
      the boolean value indicating whether the rule has antecedents
    • getConsequent

      public abstract double getConsequent()
      Get the consequent of this rule, i.e. the predicted class
      返回:
      the consequent
    • size

      public abstract double size()
      The size of the rule. Could be number of antecedents in the case of conjunctive rule
      返回:
      the size of the rule