Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cc.mallet.classify
Class C45Trainer

    java.lang.Object
      cc.mallet.classify.ClassifierTrainer<C45>
          cc.mallet.classify.C45Trainer

All Implemented Interfaces:
  Boostable

    public class C45Trainer

extends ClassifierTrainer<C45>
implements Boostable

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"

Author:
  Gary Huang ghuang@cs.umass.edu

Nested Class Summary

Nested classes/interfaces inherited from class cc.mallet.classify.ClassifierTrainer
`ClassifierTrainer.ByActiveLearning<C extends Classifier>, ClassifierTrainer.ByIncrements<C extends Classifier>, ClassifierTrainer.ByInstanceIncrements<C extends Classifier>, ClassifierTrainer.ByOptimization<C extends Classifier>, ClassifierTrainer.Factory<CT extends ClassifierTrainer<? extends Classifier>>`

Field Summary

Fields inherited from class cc.mallet.classify.ClassifierTrainer
`finishedTraining, validationSet`

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
`C45` | `getClassifier()`
`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)`
`C45` | `train(InstanceList trainingList)`

Methods inherited from class cc.mallet.classify.ClassifierTrainer
`getValidationInstances, isFinishedTraining, setValidationInstances`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### C45Trainer

    public C45Trainer()

  Uses default values: not depth limited tree with a minimum of 2 instances in each leaf node

### C45Trainer

    public C45Trainer(int maxDepth)

  Construct a depth-limited tree with the given depth limit

### C45Trainer

    public C45Trainer(boolean doPruning)

### C45Trainer

    public C45Trainer(int maxDepth,
                      boolean doPruning)

Method Detail

### getClassifier

    public C45 getClassifier()

  Specified by:
    `getClassifier` in class `ClassifierTrainer<C45>`

### setDoPruning

    public void setDoPruning(boolean doPruning)

### getDoPruning

    public boolean getDoPruning()

### setDepthLimited

    public void setDepthLimited(boolean depthLimited)

### getDepthLimited

    public boolean getDepthLimited()

### setMaxDepth

    public void setMaxDepth(int maxDepth)

### getMaxDepth

    public int getMaxDepth()

### setMinNumInsts

    public void setMinNumInsts(int minNumInsts)

### getMinNumInsts

    public int getMinNumInsts()

### splitTree

    protected void splitTree(C45.Node node,
                             int depth)

### train

    public C45 train(InstanceList trainingList)

  Specified by:
    `train` in class `ClassifierTrainer<C45>`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD