weka.classifiers.rules
Class OneR.OneRRule

java.lang.Object
  extended byweka.classifiers.rules.OneR.OneRRule
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
OneR

private class OneR.OneRRule
extends java.lang.Object
implements java.io.Serializable

Class for storing store a 1R rule.


Field Summary
private  Attribute m_attr
          Attribute to test
private  double[] m_breakpoints
          Breakpoints (numeric attributes only)
private  Attribute m_class
          The class attribute.
private  int[] m_classifications
          Predicted class for each value of attr
private  int m_correct
          Training set examples this rule gets right
private  int m_missingValueClass
          Predicted class for missing values
private  int m_numInst
          The number of instances used for building the rule.
 
Constructor Summary
OneR.OneRRule(Instances data, Attribute attribute)
          Constructor for nominal attribute.
OneR.OneRRule(Instances data, Attribute attribute, int nBreaks)
          Constructor for numeric attribute.
 
Method Summary
 java.lang.String toString()
          Returns a description of the rule.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_class

private Attribute m_class
The class attribute.


m_numInst

private int m_numInst
The number of instances used for building the rule.


m_attr

private Attribute m_attr
Attribute to test


m_correct

private int m_correct
Training set examples this rule gets right


m_classifications

private int[] m_classifications
Predicted class for each value of attr


m_missingValueClass

private int m_missingValueClass
Predicted class for missing values


m_breakpoints

private double[] m_breakpoints
Breakpoints (numeric attributes only)

Constructor Detail

OneR.OneRRule

public OneR.OneRRule(Instances data,
                     Attribute attribute)
              throws java.lang.Exception
Constructor for nominal attribute.


OneR.OneRRule

public OneR.OneRRule(Instances data,
                     Attribute attribute,
                     int nBreaks)
              throws java.lang.Exception
Constructor for numeric attribute.

Method Detail

toString

public java.lang.String toString()
Returns a description of the rule.