cc.mallet.classify
Class DecisionTreeTrainer
java.lang.Object
cc.mallet.classify.ClassifierTrainer<DecisionTree>
cc.mallet.classify.DecisionTreeTrainer
- All Implemented Interfaces:
- Boostable
public class DecisionTreeTrainer
- extends ClassifierTrainer<DecisionTree>
- implements Boostable
A decision tree learner, roughly ID3, but only to a fixed given depth in all branches.
Does not yet implement splitting of continuous-valued features, but
it should in the future. Currently a feature is considered
"present" if it has positive value.
ftp://ftp.cs.cmu.edu/project/jair/volume4/quinlan96a.ps
Only set up for conveniently learning decision stubs: there is no pruning or
good stopping rule. Currently only stop by reaching a maximum depth.
- Author:
- Andrew McCallum mccallum@cs.umass.edu
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAX_DEPTH
public static final int DEFAULT_MAX_DEPTH
- See Also:
- Constant Field Values
DEFAULT_MIN_INFO_GAIN_SPLIT
public static final double DEFAULT_MIN_INFO_GAIN_SPLIT
- See Also:
- Constant Field Values
DecisionTreeTrainer
public DecisionTreeTrainer(int maxDepth)
DecisionTreeTrainer
public DecisionTreeTrainer()
setMaxDepth
public DecisionTreeTrainer setMaxDepth(int maxDepth)
setMinInfoGainSplit
public DecisionTreeTrainer setMinInfoGainSplit(double m)
isFinishedTraining
public boolean isFinishedTraining()
- Overrides:
isFinishedTraining
in class ClassifierTrainer<DecisionTree>
getClassifier
public DecisionTree getClassifier()
- Specified by:
getClassifier
in class ClassifierTrainer<DecisionTree>
train
public DecisionTree train(InstanceList trainingList)
- Specified by:
train
in class ClassifierTrainer<DecisionTree>
splitTree
protected void splitTree(DecisionTree.Node node,
FeatureSelection selectedFeatures,
int depth)