com.rapidminer.operator.learner.tree
Class InfoGainCriterion
java.lang.Object
com.rapidminer.operator.learner.tree.AbstractCriterion
com.rapidminer.operator.learner.tree.InfoGainCriterion
- All Implemented Interfaces:
- Criterion, MinimalGainHandler
- Direct Known Subclasses:
- GainRatioCriterion
public class InfoGainCriterion
- extends AbstractCriterion
- implements MinimalGainHandler
This criterion implements the well known information gain in
order to calculate the benefit of a split. The information gain
is defined as the change in entropy from a prior state to a
state that takes some information as given by the entropy.
- Author:
- Sebastian Land, Ingo Mierswa
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InfoGainCriterion
public InfoGainCriterion()
InfoGainCriterion
public InfoGainCriterion(double minimalGain)
setMinimalGain
public void setMinimalGain(double minimalGain)
- Specified by:
setMinimalGain in interface MinimalGainHandler
getNominalBenefit
public double getNominalBenefit(ExampleSet exampleSet,
Attribute attribute)
- Specified by:
getNominalBenefit in interface Criterion
getNumericalBenefit
public double getNumericalBenefit(ExampleSet exampleSet,
Attribute attribute,
double splitValue)
- Specified by:
getNumericalBenefit in interface Criterion
getBenefit
protected double getBenefit(double[][] weightCounts)
getEntropy
protected double getEntropy(double[] labelWeights,
double totalWeight)
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