}
public LinearClassifier batchTrain(
ArrayList<ClassificationInstance> trainingData) {
LinearClassifier w = new LinearClassifier(this.xAlphabet,
this.yAlphabet, this.fxy);
LinearClassifier theta = null;
if (this.performAveraging) {
theta = new LinearClassifier(this.xAlphabet, this.yAlphabet,
this.fxy);
}
for (int iter = 0; iter < this.numIterations; iter++) {
for (ClassificationInstance inst : trainingData) {
int yhat = w.label(inst.x);