public class InfoGainSplitCriterion extends AbstractOptionHandler implements SplitCriterion
Modifier and Type | Field and Description |
---|---|
FloatOption |
minBranchFracOption |
classOptionNamesToPreparedObjects, options
Constructor and Description |
---|
InfoGainSplitCriterion() |
Modifier and Type | Method and Description |
---|---|
static double |
computeEntropy(double[] dist) |
static double |
computeEntropy(double[][] dists) |
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
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
|
static int |
numSubsetsGreaterThanFrac(double[][] distributions,
double minFrac) |
protected void |
prepareForUseImpl(TaskMonitor monitor,
ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.
|
copy, discoverOptionsViaReflection, getCLICreationString, getOptions, getPreparedClassOption, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
measureByteSize
public FloatOption minBranchFracOption
public double getMeritOfSplit(double[] preSplitDist, double[][] postSplitDists)
SplitCriterion
getMeritOfSplit
in interface SplitCriterion
preSplitDist
- the class distribution before the splitpublic double getRangeOfMerit(double[] preSplitDist)
SplitCriterion
getRangeOfMerit
in interface SplitCriterion
preSplitDist
- the class distribution before the splitpublic static double computeEntropy(double[] dist)
public static double computeEntropy(double[][] dists)
public static int numSubsetsGreaterThanFrac(double[][] distributions, double minFrac)
public void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentprotected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to useCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.