Package cc.mallet.classify
Class ClassifierEnsemble
- java.lang.Object
-
- cc.mallet.classify.Classifier
-
- cc.mallet.classify.ClassifierEnsemble
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class ClassifierEnsemble extends Classifier
Classifer for an ensemble of classifers, combined with learned weights. The procedure is to obtain the score from each classifier (typically p(y|x)), perform the weighted sum of these scores, then exponentiate the summed score for each class, and re-normalize the resulting per-class scores. In other words, the scores of the ensemble classifiers are treated as input features in a Maximum Entropy classifier.- Author:
- Andrew McCallum
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class cc.mallet.classify.Classifier
instancePipe
-
-
Constructor Summary
Constructors Constructor Description ClassifierEnsemble(Classifier[] classifiers, double[] weights)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classification
classify(Instance instance)
-
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
-
ClassifierEnsemble
public ClassifierEnsemble(Classifier[] classifiers, double[] weights)
-
-
Method Detail
-
classify
public Classification classify(Instance instance)
- Specified by:
classify
in classClassifier
-
-