Package cc.mallet.classify
Class Winnow
- java.lang.Object
-
- cc.mallet.classify.Classifier
-
- 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
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Constructor Detail
-
Winnow
public Winnow(Pipe dataPipe, double[][] newWeights, double theta, int idim, int jdim)
Passes along data pipe and weights fromWinnowTrainer
- Parameters:
dataPipe
- needed for dictionary, labels, feature vectors, etcnewWeights
- weights calculated during training phasetheta
- value used for thresholdidim
- i dimension of weights arrayjdim
- j dimension of weights array
-
-
Method Detail
-
classify
public Classification classify(Instance instance)
Classifies an instance using Winnow's weights- Specified by:
classify
in classClassifier
- Parameters:
instance
- an instance to be classified- Returns:
- an object containing the classifier's guess
-
-