Package cc.mallet.classify
Class AdaBoostM2
- java.lang.Object
-
- cc.mallet.classify.Classifier
-
- cc.mallet.classify.AdaBoostM2
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class AdaBoostM2 extends Classifier implements java.io.Serializable
AdaBoostM2Yoav Freund and Robert E. Schapire "Experiments with a New Boosting Algorithm" In Journal of Machine Learning: Proceedings of the 13th International Conference, 1996 http://www.cs.princeton.edu/~schapire/papers/FreundSc96b.ps.Z
- Author:
- Gary Huang ghuang@cs.umass.edu
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class cc.mallet.classify.Classifier
instancePipe
-
-
Constructor Summary
Constructors Constructor Description AdaBoostM2(Pipe instancePipe, Classifier[] weakClassifiers, double[] alphas)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classification
classify(Instance inst)
Classification
classify(Instance inst, int numWeakClassifiersToUse)
Classify the given instance using only the first numWeakClassifiersToUse classifiers trained during boostingint
getNumWeakClassifiers()
Get the number of weak classifiers in this ensemble classifierAdaBoostM2
getTrimmedClassifier(int numWeakClassifiersToUse)
Return an AdaBoostM2 classifier that uses only the first numWeakClassifiersToUse weak learners.-
Methods inherited from class cc.mallet.classify.Classifier
alphabetsMatch, classify, classify, classify, getAccuracy, getAlphabet, getAlphabets, getAverageRank, getF1, getF1, getF1, getFeatureSelection, getInstancePipe, getLabelAlphabet, getPerClassFeatureSelection, getPrecision, getPrecision, getPrecision, getRecall, getRecall, getRecall, print, print
-
-
-
-
Constructor Detail
-
AdaBoostM2
public AdaBoostM2(Pipe instancePipe, Classifier[] weakClassifiers, double[] alphas)
-
-
Method Detail
-
getNumWeakClassifiers
public int getNumWeakClassifiers()
Get the number of weak classifiers in this ensemble classifier
-
getTrimmedClassifier
public AdaBoostM2 getTrimmedClassifier(int numWeakClassifiersToUse)
Return an AdaBoostM2 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 classClassifier
-
classify
public Classification classify(Instance inst, int numWeakClassifiersToUse)
Classify the given instance using only the first numWeakClassifiersToUse classifiers trained during boosting
-
-