All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home

Class weka.classifiers.rules.Rule

java.lang.Object
    |
    +----weka.classifiers.rules.Rule

public abstract class Rule
extends java.lang.Object
implements WeightedInstancesHandler, Copyable
Abstract class of generic rule

Version:
$Revision: 1.2 $
Author:
Xin Xu (xx5@cs.waikato.ac.nz)

Constructor Index

 o Rule()
 

Method Index

 o copy()
Get a shallow copy of this rule
 o covers(Instance)
Whether the instance covered by this rule
 o getConsequent()
Get the consequent of this rule, i.e.
 o grow(Instances)
Build this rule
 o hasAntds()
Whether this rule has antecedents, i.e.
 o size()
The size of the rule.

Constructor Detail

 o Rule
public Rule()

Method Detail

 o copy
public java.lang.Object copy()
          Get a shallow copy of this rule
Returns:
the copy
 o covers
public abstract boolean covers(Instance datum)
          Whether the instance covered by this rule
Parameters:
inst - the instance in question
Returns:
the boolean value indicating whether the instance is covered by this rule
 o grow
public abstract void grow(Instances data) throws java.lang.Exception
          Build this rule
Parameters:
data - the data used to build the rule
Throws:
if - rule cannot be built
 o hasAntds
public abstract boolean hasAntds()
          Whether this rule has antecedents, i.e. whether it is a default rule
Returns:
the boolean value indicating whether the rule has antecedents
 o getConsequent
public abstract double getConsequent()
          Get the consequent of this rule, i.e. the predicted class
Returns:
the consequent
 o size
public abstract double size()
          The size of the rule. Could be number of antecedents in the case of conjunctive rule
Returns:
the size of the rule

All Packages  Class Hierarchy  This Package  Previous  Next  Index  WEKA's home