public class BalancedWinnow extends Classifier implements Serializable
BalancedWinnowTrainer,
Serialized ForminstancePipe| Constructor and Description |
|---|
BalancedWinnow(Pipe dataPipe,
double[][] weights)
Passes along data pipe and weights from
BalancedWinnowTrainer |
| Modifier and Type | Method and Description |
|---|---|
Classification |
classify(Instance instance)
Classifies an instance using BalancedWinnow's weights
|
double[][] |
getWeights() |
classify, classify, classify, getAccuracy, getAccuracy, getAlphabet, getF1, getF1, getF1, getF1, getInstancePipe, getLabelAlphabet, getPrecision, getPrecision, getPrecision, getPrecision, getRecall, getRecall, getRecall, getRecall, print, printpublic BalancedWinnow(Pipe dataPipe, double[][] weights)
BalancedWinnowTrainerdataPipe - needed for dictionary, labels, feature vectors, etcweights - weights calculated during training phasepublic 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 ClassifierCopyright © 2019 JULIE Lab, Germany. All rights reserved.