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

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.AdaBoost
All Implemented Interfaces:
BinaryClassifierLearner, ClassifierLearner, java.lang.Cloneable
Direct Known Subclasses:
AdaBoost.L, Recommended.BoostedDecisionTreeLearner, Recommended.BoostedStumpLearner

public class AdaBoost
extends BatchBinaryClassifierLearner

Generalized version of AdaBoost, as described in Robert E. Schapire and Yoram Singer, Improved boosting algorithms using confidence-rated predictions. Machine Learning, 37(3):297-336, 1999.

The base learner intended for this is the decision-tree learner in this package.

Author:
William Cohen

Nested Class Summary
static class AdaBoost.L
          AdaBoost.L is a logistic-regression version of AdaBoost.
 
Field Summary
 
Fields inherited from class edu.cmu.minorthird.classify.BatchClassifierLearner
classifier, dataset
 
Constructor Summary
AdaBoost()
           
AdaBoost(BatchClassifierLearner baseLearner, int maxRounds)
           
 
Method Summary
 Classifier batchTrain(Dataset dataset)
          subclasses should use this method to implement a batch supervised learning algorithm.
protected  double discountFactor(double y, double yhat)
           
 BatchClassifierLearner getBaseLearner()
           
 int getMaxRounds()
           
 void setBaseLearner(BatchClassifierLearner learner)
           
 void setMaxRounds(int n)
           
 
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

AdaBoost

public AdaBoost()

AdaBoost

public AdaBoost(BatchClassifierLearner baseLearner,
                int maxRounds)
Method Detail

getMaxRounds

public int getMaxRounds()

setMaxRounds

public void setMaxRounds(int n)

getBaseLearner

public BatchClassifierLearner getBaseLearner()

setBaseLearner

public void setBaseLearner(BatchClassifierLearner learner)

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

discountFactor

protected double discountFactor(double y,
                                double yhat)