|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umass.cs.mallet.base.classify.Classifier
edu.umass.cs.mallet.base.classify.BalancedWinnow
Classification methods of BalancedWinnow algorithm.
BalancedWinnowTrainer
,
Serialized FormField Summary |
Fields inherited from class edu.umass.cs.mallet.base.classify.Classifier |
instancePipe |
Constructor Summary | |
BalancedWinnow(Pipe dataPipe,
double[][] weights)
Passes along data pipe and weights from BalancedWinnowTrainer |
Method Summary | |
Classification |
classify(Instance instance)
Classifies an instance using BalancedWinnow's weights |
double[][] |
getWeights()
|
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 |
public BalancedWinnow(Pipe dataPipe, double[][] weights)
BalancedWinnowTrainer
dataPipe
- needed for dictionary, labels, feature vectors, etcweights
- weights calculated during training phaseMethod Detail |
public double[][] getWeights()
public Classification classify(Instance instance)
Returns a Classification containing the normalized dot products between class weight vectors and the instance feature vector.
One can obtain the confidence of the classification by
calculating weight(j')/weight(j), where j' is the
highest weight prediction and j is the 2nd-highest.
Another possibility is to calculate
classify
in class Classifier
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |