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

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.RandomForests
All Implemented Interfaces:
BinaryClassifierLearner, ClassifierLearner, java.lang.Cloneable

public class RandomForests
extends BatchBinaryClassifierLearner

Random Forests implementation. See http://www.stat.berkeley.edu/~breiman/RandomForests/ For algorith details.

Author:
Alexander Friedman

Nested Class Summary
static class RandomForests.VotingClassifier
          A set of RandomTree Classifiers FIXME!! All of this stuff is copied directly for AdaBoost with (very) minor modifications
 
Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
classifier, dataset
 
Constructor Summary
RandomForests()
           
RandomForests(int numComponents)
           
RandomForests(RandomTreeLearner baseLearner, int numComponents)
           
 
Method Summary
 Classifier batchTrain(Dataset dataset)
          subclasses should use this method to implement a batch supervised learning algorithm.
static java.util.Vector<Feature> getDatasetFeatures(Dataset dataset)
          Return a vector of all features in the dataset.
 
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

RandomForests

public RandomForests()

RandomForests

public RandomForests(int numComponents)

RandomForests

public RandomForests(RandomTreeLearner baseLearner,
                     int numComponents)
Method Detail

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

getDatasetFeatures

public static java.util.Vector<Feature> getDatasetFeatures(Dataset dataset)
Return a vector of all features in the dataset. This should really be in the 'Dataset' interface

Parameters:
dataset -
Returns:
a vector of all features in the dataset