weka.attributeSelection
Class OneRAttributeEval

java.lang.Object
  |
  +--weka.attributeSelection.ASEvaluation
        |
        +--weka.attributeSelection.AttributeEvaluator
              |
              +--weka.attributeSelection.OneRAttributeEval
All Implemented Interfaces:
java.io.Serializable

public class OneRAttributeEval
extends AttributeEvaluator

Class for Evaluating attributes individually by using the OneR classifier.

No options.

Author:
Mark Hall (mhall@cs.waikato.ac.nz)
See Also:
Serialized Form

Constructor Summary
OneRAttributeEval()
          Constructor
 
Method Summary
 void buildEvaluator(Instances data)
          Initializes an information gain attribute evaluator.
 double evaluateAttribute(int attribute)
          evaluates an individual attribute by measuring the amount of information gained about the class given the attribute.
 java.lang.String globalInfo()
          Returns a string describing this attribute evaluator
static void main(java.lang.String[] args)
          Main method for testing this class.
protected  void resetOptions()
          rests to defaults.
 java.lang.String toString()
          Return a description of the evaluator
 
Methods inherited from class weka.attributeSelection.ASEvaluation
forName, makeCopies, postProcess
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OneRAttributeEval

public OneRAttributeEval()
Constructor
Method Detail

globalInfo

public java.lang.String globalInfo()
Returns a string describing this attribute evaluator
Returns:
a description of the evaluator suitable for displaying in the explorer/experimenter gui

buildEvaluator

public void buildEvaluator(Instances data)
                    throws java.lang.Exception
Initializes an information gain attribute evaluator. Discretizes all attributes that are numeric.
Overrides:
buildEvaluator in class ASEvaluation
Parameters:
data - set of instances serving as training data
Throws:
java.lang.Exception - if the evaluator has not been generated successfully

resetOptions

protected void resetOptions()
rests to defaults.

evaluateAttribute

public double evaluateAttribute(int attribute)
                         throws java.lang.Exception
evaluates an individual attribute by measuring the amount of information gained about the class given the attribute.
Overrides:
evaluateAttribute in class AttributeEvaluator
Parameters:
attribute - the index of the attribute to be evaluated
Throws:
java.lang.Exception - if the attribute could not be evaluated

toString

public java.lang.String toString()
Return a description of the evaluator
Overrides:
toString in class java.lang.Object
Returns:
description as a string

main

public static void main(java.lang.String[] args)
Main method for testing this class.
Parameters:
args - the options