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(FastRandomTreeLearner baseLearner, int numComponents)
           
RandomForests(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.
static RandomForests RepeatableForest()
           
 RandomForests setCollectStats(boolean b)
           
 RandomForests setScaleWeights(boolean b)
           
 RandomForests setSelectionSize(int c)
           
 RandomForests setSelectionSizeLog()
           
 RandomForests setThreadCount(int c)
           
 RandomForests setThreaded(boolean b)
           
 
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(FastRandomTreeLearner baseLearner,
                     int numComponents)
Method Detail

setThreaded

public RandomForests setThreaded(boolean b)

setThreadCount

public RandomForests setThreadCount(int c)

setCollectStats

public RandomForests setCollectStats(boolean b)

setScaleWeights

public RandomForests setScaleWeights(boolean b)

setSelectionSizeLog

public RandomForests setSelectionSizeLog()

setSelectionSize

public RandomForests setSelectionSize(int c)

RepeatableForest

public static RandomForests RepeatableForest()

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