Package weka.classifiers.trees.j48
Class InfoGainSplitCrit
java.lang.Object
weka.classifiers.trees.j48.SplitCriterion
weka.classifiers.trees.j48.EntropyBasedSplitCrit
weka.classifiers.trees.j48.InfoGainSplitCrit
- All Implemented Interfaces:
Serializable
,RevisionHandler
Class for computing the information gain for a given distribution.
- Version:
- $Revision: 10169 $
- Author:
- Eibe Frank (eibe@cs.waikato.ac.nz)
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the revision string.final double
splitCritValue
(Distribution bags) This method is a straightforward implementation of the information gain criterion for the given distribution.final double
splitCritValue
(Distribution bags, double totalNoInst) This method computes the information gain in the same way C4.5 does.final double
splitCritValue
(Distribution bags, double totalNoInst, double oldEnt) This method computes the information gain in the same way C4.5 does.Methods inherited from class weka.classifiers.trees.j48.EntropyBasedSplitCrit
lnFunc, newEnt, oldEnt, splitEnt
Methods inherited from class weka.classifiers.trees.j48.SplitCriterion
splitCritValue, splitCritValue, splitCritValue
-
Constructor Details
-
InfoGainSplitCrit
public InfoGainSplitCrit()
-
-
Method Details
-
splitCritValue
This method is a straightforward implementation of the information gain criterion for the given distribution.- Overrides:
splitCritValue
in classSplitCriterion
- Returns:
- value of splitting criterion. 0 by default
-
splitCritValue
This method computes the information gain in the same way C4.5 does.- Parameters:
bags
- the distributiontotalNoInst
- weight of ALL instances (including the ones with missing values).
-
splitCritValue
This method computes the information gain in the same way C4.5 does.- Parameters:
bags
- the distributiontotalNoInst
- weight of ALL instancesoldEnt
- entropy with respect to "no-split"-model.
-
getRevision
Returns the revision string.- Returns:
- the revision
-