edu.umass.cs.mallet.base.classify
Class DecisionTreeTrainer
java.lang.Object
edu.umass.cs.mallet.base.classify.ClassifierTrainer
edu.umass.cs.mallet.base.classify.DecisionTreeTrainer
- All Implemented Interfaces:
- Boostable
- public class DecisionTreeTrainer
- extends ClassifierTrainer
- implements Boostable
A decision tree learner, roughly ID3.
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 conventiently learning decision stubs: there is no pruning or
good stopping rule. Currently only stop by reaching a maximum depth.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DecisionTreeTrainer
public DecisionTreeTrainer(int maxDepth)
DecisionTreeTrainer
public DecisionTreeTrainer()
splitTree
protected void splitTree(DecisionTree.Node node,
FeatureSelection selectedFeatures,
int depth)
train
public Classifier train(InstanceList trainingList,
InstanceList validationList,
InstanceList testSet,
ClassifierEvaluating evaluator,
Classifier initialClassifier)
- Description copied from class:
ClassifierTrainer
- Return a new classifier tuned using the three arguments.
- Specified by:
train
in class ClassifierTrainer
- Parameters:
trainingList
- examples used to set parameters.validationList
- examples used to tune meta-parameters. May be null.testSet
- examples not examined at all for training, but passed on to diagnostic routines. May be null.initialClassifier
- training process may start from here. The parameters of the initialClassifier are not modified. May be null.