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

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.RandomTreeLearner
All Implemented Interfaces:
BinaryClassifierLearner, ClassifierLearner, java.lang.Cloneable
Direct Known Subclasses:
FastRandomTreeLearner

public class RandomTreeLearner
extends BatchBinaryClassifierLearner

Implement a random decision tree to be used in the random forest learner. Implements two tree splitters. Default one splits on random features. BestOfN splits on the b best of N randomly chosen features.

Author:
Alexander Friedman

Nested Class Summary
static class RandomTreeLearner.BestOfNRandomTreeSplitter
           
static class RandomTreeLearner.RandomTreeSplitter
           
static interface RandomTreeLearner.TreeSplitter
           
 
Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
classifier, dataset
 
Constructor Summary
RandomTreeLearner()
           
RandomTreeLearner(RandomTreeLearner.TreeSplitter b)
           
 
Method Summary
 Classifier batchTrain(Dataset dataset)
          subclasses should use this method to implement a batch supervised learning algorithm.
 edu.cmu.minorthird.classify.algorithms.trees.DecisionTree batchTrain(java.util.List<Example> dataset, int depth, java.util.Vector<Feature> unusedFeatures)
           
 Classifier batchTrain(java.util.List<Example> dataset, java.util.Vector<Feature> allFeatures)
           
 
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

RandomTreeLearner

public RandomTreeLearner()

RandomTreeLearner

public RandomTreeLearner(RandomTreeLearner.TreeSplitter b)
Method Detail

batchTrain

public Classifier batchTrain(java.util.List<Example> dataset,
                             java.util.Vector<Feature> allFeatures)

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

batchTrain

public edu.cmu.minorthird.classify.algorithms.trees.DecisionTree batchTrain(java.util.List<Example> dataset,
                                                                            int depth,
                                                                            java.util.Vector<Feature> unusedFeatures)