cc.mallet.classify
Class Winnow

java.lang.Object
  extended by cc.mallet.classify.Classifier
      extended by cc.mallet.classify.Winnow
All Implemented Interfaces:
AlphabetCarrying, java.io.Serializable

public class Winnow
extends Classifier

Classification methods of Winnow2 algorithm.

See Also:
WinnowTrainer, Serialized Form

Field Summary
 
Fields inherited from class cc.mallet.classify.Classifier
instancePipe
 
Constructor Summary
Winnow(Pipe dataPipe, double[][] newWeights, double theta, int idim, int jdim)
          Passes along data pipe and weights from WinnowTrainer
 
Method Summary
 Classification classify(Instance instance)
          Classifies an instance using Winnow's weights
 
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

Winnow

public Winnow(Pipe dataPipe,
              double[][] newWeights,
              double theta,
              int idim,
              int jdim)
Passes along data pipe and weights from WinnowTrainer

Parameters:
dataPipe - needed for dictionary, labels, feature vectors, etc
newWeights - weights calculated during training phase
theta - value used for threshold
idim - i dimension of weights array
jdim - j dimension of weights array
Method Detail

classify

public Classification classify(Instance instance)
Classifies an instance using Winnow's weights

Specified by:
classify in class Classifier
Parameters:
instance - an instance to be classified
Returns:
an object containing the classifier's guess