Package cc.mallet.classify
Class MCMaxEnt
- java.lang.Object
-
- cc.mallet.classify.Classifier
-
- cc.mallet.classify.MCMaxEnt
-
- All Implemented Interfaces:
AlphabetCarrying
,java.io.Serializable
public class MCMaxEnt extends Classifier implements java.io.Serializable
Maximum Entropy classifier.- Author:
- Andrew McCallum mccallum@cs.umass.edu
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class cc.mallet.classify.Classifier
instancePipe
-
-
Constructor Summary
Constructors Constructor Description MCMaxEnt(Pipe dataPipe, double[] parameters)
MCMaxEnt(Pipe dataPipe, double[] parameters, FeatureSelection featureSelection)
MCMaxEnt(Pipe dataPipe, double[] parameters, FeatureSelection[] perClassFeatureSelection)
MCMaxEnt(Pipe dataPipe, double[] parameters, FeatureSelection featureSelection, FeatureSelection[] perClassFeatureSelection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Classification
classify(Instance instance)
void
getClassificationScores(Instance instance, double[] scores)
double[]
getParameters()
void
getUnnormalizedClassificationScores(Instance instance, double[] scores)
void
print()
Outputs human-readable description of classifier (e.g., list of weights, decision tree) to System.outvoid
setParameter(int classIndex, int featureIndex, double value)
-
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
-
-
-
-
Constructor Detail
-
MCMaxEnt
public MCMaxEnt(Pipe dataPipe, double[] parameters, FeatureSelection featureSelection, FeatureSelection[] perClassFeatureSelection)
-
MCMaxEnt
public MCMaxEnt(Pipe dataPipe, double[] parameters, FeatureSelection featureSelection)
-
MCMaxEnt
public MCMaxEnt(Pipe dataPipe, double[] parameters, FeatureSelection[] perClassFeatureSelection)
-
MCMaxEnt
public MCMaxEnt(Pipe dataPipe, double[] parameters)
-
-
Method Detail
-
getParameters
public double[] getParameters()
-
setParameter
public void setParameter(int classIndex, int featureIndex, double value)
-
getUnnormalizedClassificationScores
public void getUnnormalizedClassificationScores(Instance instance, double[] scores)
-
getClassificationScores
public void getClassificationScores(Instance instance, double[] scores)
-
classify
public Classification classify(Instance instance)
- Specified by:
classify
in classClassifier
-
print
public void print()
Description copied from class:Classifier
Outputs human-readable description of classifier (e.g., list of weights, decision tree) to System.out- Overrides:
print
in classClassifier
-
-