public class WinnowTrainer extends ClassifierTrainer
theta, then the classifier guess
true for that class.
Only when the classifier makes a mistake are the
weights updated in one of two steps:
Promote: guessed 0 and answer was 1. Multiply
all weights of present features by alpha.
Demote: guessed 1 and answer was 0. Divide
all weights of present features by beta.
Limitations: Winnow2 only considers binary feature
vectors (i.e. whether or not the feature is present,
not its value).| Constructor and Description |
|---|
WinnowTrainer()
Default constructor.
|
WinnowTrainer(double a,
double b)
Sets alpha and beta and default value for theta
|
WinnowTrainer(double a,
double b,
double nfact)
Sets alpha, beta, and nfactor
|
| Modifier and Type | Method and Description |
|---|---|
Classifier |
train(InstanceList trainingList,
InstanceList validationList,
InstanceList testSet,
ClassifierEvaluating evaluator,
Classifier initialClassifier)
Trains winnow on the instance list, updating
weights according to errors |
public WinnowTrainer()
public WinnowTrainer(double a,
double b)
a - alpha valueb - beta valuepublic WinnowTrainer(double a,
double b,
double nfact)
a - alpha valueb - beta valuenfact - nfactor valuepublic Classifier train(InstanceList trainingList, InstanceList validationList, InstanceList testSet, ClassifierEvaluating evaluator, Classifier initialClassifier)
weights according to errorstrain in class ClassifierTrainerilist - Instance list to be trained onCopyright © 2019 JULIE Lab, Germany. All rights reserved.