|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umass.cs.mallet.base.classify.ClassifierTrainer
edu.umass.cs.mallet.base.classify.C45Trainer
A C4.5 decision tree learner, approximtely. Currently treats all features as continuous-valued, and has no notion of missing values.
This implementation uses MDL for pruning.
J. R. Quinlan
"Improved Use of Continuous Attributes in C4.5"
ftp://ftp.cs.cmu.edu/project/jair/volume4/quinlan96a.ps
J. R. Quinlan and R. L. Rivest
"Inferring Decision Trees Using Minimum Description Length Principle"
Constructor Summary | |
C45Trainer()
Uses default values: not depth limited tree with a minimum of 2 instances in each leaf node |
|
C45Trainer(boolean doPruning)
|
|
C45Trainer(int maxDepth)
Construct a depth-limited tree with the given depth limit |
|
C45Trainer(int maxDepth,
boolean doPruning)
|
Method Summary | |
boolean |
getDepthLimited()
|
boolean |
getDoPruning()
|
int |
getMaxDepth()
|
int |
getMinNumInsts()
|
void |
setDepthLimited(boolean depthLimited)
|
void |
setDoPruning(boolean doPruning)
|
void |
setMaxDepth(int maxDepth)
|
void |
setMinNumInsts(int minNumInsts)
|
protected void |
splitTree(C45.Node node,
int depth)
|
Classifier |
train(InstanceList trainingList,
InstanceList validationList,
InstanceList testSet,
ClassifierEvaluating evaluator,
Classifier initialClassifier)
Return a new classifier tuned using the three arguments. |
Methods inherited from class edu.umass.cs.mallet.base.classify.ClassifierTrainer |
main, toString, train, train, train, train |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public C45Trainer()
public C45Trainer(int maxDepth)
public C45Trainer(boolean doPruning)
public C45Trainer(int maxDepth, boolean doPruning)
Method Detail |
public void setDoPruning(boolean doPruning)
public boolean getDoPruning()
public void setDepthLimited(boolean depthLimited)
public boolean getDepthLimited()
public void setMaxDepth(int maxDepth)
public int getMaxDepth()
public void setMinNumInsts(int minNumInsts)
public int getMinNumInsts()
protected void splitTree(C45.Node node, int depth)
public Classifier train(InstanceList trainingList, InstanceList validationList, InstanceList testSet, ClassifierEvaluating evaluator, Classifier initialClassifier)
ClassifierTrainer
train
in class ClassifierTrainer
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |