edu.umass.cs.mallet.base.classify
Class AdaBoost

java.lang.Object
  extended byedu.umass.cs.mallet.base.classify.Classifier
      extended byedu.umass.cs.mallet.base.classify.AdaBoost

public class AdaBoost
extends Classifier

AdaBoost Robert E. Schapire. "The boosting approach to machine learning: An overview." In MSRI Workshop on Nonlinear Estimation and Classification, 2002. http://www.research.att.com/~schapire/cgi-bin/uncompress-papers/msri.ps


Field Summary
 
Fields inherited from class edu.umass.cs.mallet.base.classify.Classifier
instancePipe
 
Constructor Summary
AdaBoost(Pipe instancePipe, Classifier[] weakClassifiers, double[] alphas)
           
 
Method Summary
 Classification classify(Instance inst)
           
 Classification classify(Instance inst, int numWeakClassifiersToUse)
          Classify the given instance using only the first numWeakClassifiersToUse classifiers trained during boosting
 int getNumWeakClassifiers()
          Get the number of weak classifiers in this ensemble classifier
 AdaBoost getTrimmedClassifier(int numWeakClassifiersToUse)
          Return an AdaBoost classifier that uses only the first numWeakClassifiersToUse weak learners.
 
Methods inherited from class edu.umass.cs.mallet.base.classify.Classifier
classify, classify, classify, getAccuracy, getAccuracy, getAlphabet, getF1, getF1, getF1, getF1, getInstancePipe, getLabelAlphabet, getPrecision, getPrecision, getPrecision, getPrecision, getRecall, getRecall, getRecall, getRecall, print, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdaBoost

public AdaBoost(Pipe instancePipe,
                Classifier[] weakClassifiers,
                double[] alphas)
Method Detail

getNumWeakClassifiers

public int getNumWeakClassifiers()
Get the number of weak classifiers in this ensemble classifier


getTrimmedClassifier

public AdaBoost getTrimmedClassifier(int numWeakClassifiersToUse)
Return an AdaBoost classifier that uses only the first numWeakClassifiersToUse weak learners.

The returned classifier's Pipe and weak classifiers are backed by the respective objects of this classifier, so changes to the returned classifier's Pipe and weak classifiers are reflected in this classifier, and vice versa.


classify

public Classification classify(Instance inst)
Specified by:
classify in class Classifier

classify

public Classification classify(Instance inst,
                               int numWeakClassifiersToUse)
Classify the given instance using only the first numWeakClassifiersToUse classifiers trained during boosting