MOA 12.03
Real Time Analytics for Data Streams
|
Class for computing splitting criteria using information gain with respect to distributions of class values. More...
Public Member Functions | |
double | getMeritOfSplit (double[] preSplitDist, double[][] postSplitDists) |
Computes the merit of splitting for a given ditribution before the split and after it. | |
double | getRangeOfMerit (double[] preSplitDist) |
Computes the range of splitting merit. | |
void | getDescription (StringBuilder sb, int indent) |
Returns a string representation of this object. | |
Static Public Member Functions | |
static double | computeEntropy (double[] dist) |
static double | computeEntropy (double[][] dists) |
static int | numSubsetsGreaterThanFrac (double[][] distributions, double minFrac) |
Public Attributes | |
FloatOption | minBranchFracOption |
Protected Member Functions | |
void | prepareForUseImpl (TaskMonitor monitor, ObjectRepository repository) |
This method describes the implementation of how to prepare this object for use. |
Class for computing splitting criteria using information gain with respect to distributions of class values.
The split criterion is used as a parameter on decision trees and decision stumps.
Definition at line 37 of file InfoGainSplitCriterion.java.
static double moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.computeEntropy | ( | double[] | dist | ) | [static] |
Definition at line 62 of file InfoGainSplitCriterion.java.
Referenced by moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.computeEntropy(), and moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.getMeritOfSplit().
static double moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.computeEntropy | ( | double | dists[][] | ) | [static] |
Definition at line 74 of file InfoGainSplitCriterion.java.
void moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.getDescription | ( | StringBuilder | sb, |
int | indent | ||
) |
Returns a string representation of this object.
Used in AbstractMOAObject.toString
to give a string representation of the object.
sb | the stringbuilder to add the description |
indent | the number of characters to indent |
Implements moa.MOAObject.
Definition at line 109 of file InfoGainSplitCriterion.java.
double moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.getMeritOfSplit | ( | double[] | preSplitDist, |
double | postSplitDists[][] | ||
) |
Computes the merit of splitting for a given ditribution before the split and after it.
preSplitDist | the class distribution before the split |
postSplitDist | the class distribution after the split |
Implements moa.classifiers.core.splitcriteria.SplitCriterion.
Definition at line 48 of file InfoGainSplitCriterion.java.
double moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.getRangeOfMerit | ( | double[] | preSplitDist | ) |
Computes the range of splitting merit.
preSplitDist | the class distribution before the split |
Implements moa.classifiers.core.splitcriteria.SplitCriterion.
Definition at line 57 of file InfoGainSplitCriterion.java.
static int moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.numSubsetsGreaterThanFrac | ( | double | distributions[][], |
double | minFrac | ||
) | [static] |
Definition at line 88 of file InfoGainSplitCriterion.java.
Referenced by moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.getMeritOfSplit().
void moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.prepareForUseImpl | ( | TaskMonitor | monitor, |
ObjectRepository | repository | ||
) | [protected, virtual] |
This method describes the implementation of how to prepare this object for use.
All classes that extends this class have to implement prepareForUseImpl
and not prepareForUse
since prepareForUse
calls prepareForUseImpl
.
monitor | the TaskMonitor to use |
repository | the ObjectRepository to use |
Implements moa.options.AbstractOptionHandler.
Definition at line 114 of file InfoGainSplitCriterion.java.
new FloatOption("minBranchFrac", 'f', "Minimum fraction of weight required down at least two branches.", 0.01, 0.0, 0.5)
Definition at line 42 of file InfoGainSplitCriterion.java.
Referenced by moa.classifiers.core.splitcriteria.InfoGainSplitCriterion.getMeritOfSplit().