|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcc.mallet.classify.Classifier
cc.mallet.classify.BalancedWinnow
public class BalancedWinnow
Classification methods of BalancedWinnow algorithm.
BalancedWinnowTrainer,
Serialized Form| Field Summary |
|---|
| Fields inherited from class cc.mallet.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 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 |
| 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 phase| Method 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 | |||||||||