edu.cmu.minorthird.classify.algorithms.trees
Class DecisionTreeLearner

java.lang.Object
  extended by edu.cmu.minorthird.classify.BatchClassifierLearner
      extended by edu.cmu.minorthird.classify.BatchBinaryClassifierLearner
          extended by edu.cmu.minorthird.classify.algorithms.trees.DecisionTreeLearner
All Implemented Interfaces:
BinaryClassifierLearner, ClassifierLearner, java.lang.Cloneable
Direct Known Subclasses:
Recommended.DecisionTreeLearner

public class DecisionTreeLearner
extends BatchBinaryClassifierLearner

A simple decision tree learning algorithm.

Author:
William Cohen

Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
classifier, dataset
 
Constructor Summary
DecisionTreeLearner()
           
DecisionTreeLearner(int maxDepth, int minSplitCount)
           
 
Method Summary
 Classifier batchTrain(Dataset dataset)
          subclasses should use this method to implement a batch supervised learning algorithm.
 int getMaxDepth()
           
 int getMinSplitCount()
           
 void setMaxDepth(int d)
           
 void setMinSplitCount(int c)
           
 
Methods inherited from class edu.cmu.minorthird.classify.BatchBinaryClassifierLearner
batchTrainBinary, getBinaryClassifier, getSchema, setSchema
 
Methods inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
addExample, completeTraining, copy, getClassifier, hasNextQuery, nextQuery, reset, setInstancePool
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.cmu.minorthird.classify.ClassifierLearner
addExample, completeTraining, copy, getClassifier, hasNextQuery, nextQuery, reset, setInstancePool
 

Constructor Detail

DecisionTreeLearner

public DecisionTreeLearner(int maxDepth,
                           int minSplitCount)
Parameters:
maxDepth - maximum depth of the tree
minSplitCount - minimum number of examples to have before considering a split

DecisionTreeLearner

public DecisionTreeLearner()
Method Detail

getMaxDepth

public int getMaxDepth()

setMaxDepth

public void setMaxDepth(int d)

getMinSplitCount

public int getMinSplitCount()

setMinSplitCount

public void setMinSplitCount(int c)

batchTrain

public Classifier batchTrain(Dataset dataset)
Description copied from class: BatchClassifierLearner
subclasses should use this method to implement a batch supervised learning algorithm.

Specified by:
batchTrain in class BatchClassifierLearner