com.rapidminer.operator.learner.tree.criterions
Class AccuracyCriterion

java.lang.Object
  extended by com.rapidminer.operator.learner.tree.criterions.AbstractCriterion
      extended by com.rapidminer.operator.learner.tree.criterions.AccuracyCriterion
All Implemented Interfaces:
Criterion

public class AccuracyCriterion
extends AbstractCriterion

Calculates the accuracies for the given split if the children predict the majority classes.

Author:
Ingo Mierswa

Field Summary
 
Fields inherited from class com.rapidminer.operator.learner.tree.criterions.AbstractCriterion
labelAttribute, leftLabelWeights, leftWeight, rightLabelWeights, rightWeight, totalLabelWeights, totalWeight, weightAttribute
 
Constructor Summary
AccuracyCriterion()
           
 
Method Summary
 double getBenefit(double[][] weightCounts)
          This method will return the calculated benefit if the weights would have distributed over the labels as given.
 double getIncrementalBenefit()
           
 double getNominalBenefit(ExampleSet exampleSet, Attribute attribute)
           
 double getNumericalBenefit(ExampleSet exampleSet, Attribute attribute, double splitValue)
           
 boolean supportsIncrementalCalculation()
           
 
Methods inherited from class com.rapidminer.operator.learner.tree.criterions.AbstractCriterion
createCriterion, startIncrementalCalculation, swapExample
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccuracyCriterion

public AccuracyCriterion()
Method Detail

getNominalBenefit

public double getNominalBenefit(ExampleSet exampleSet,
                                Attribute attribute)

getNumericalBenefit

public double getNumericalBenefit(ExampleSet exampleSet,
                                  Attribute attribute,
                                  double splitValue)

getBenefit

public double getBenefit(double[][] weightCounts)
Description copied from interface: Criterion
This method will return the calculated benefit if the weights would have distributed over the labels as given. The first index specifies the split fraction, the second index the label. Henve the first index is always between 0 and 1 included for numerical splits, since only two sides can occur there. For splits on nominal attributes, the number of split sides is determined by the number of possible values.


supportsIncrementalCalculation

public boolean supportsIncrementalCalculation()
Specified by:
supportsIncrementalCalculation in interface Criterion
Overrides:
supportsIncrementalCalculation in class AbstractCriterion

getIncrementalBenefit

public double getIncrementalBenefit()
Specified by:
getIncrementalBenefit in interface Criterion
Overrides:
getIncrementalBenefit in class AbstractCriterion


Copyright © 2001-2009 by Rapid-I