public LinearTagger batchTrain(ArrayList<SequenceInstance> trainingData) {
Objective obj = new Objective(trainingData);
// perform gradient descent
@SuppressWarnings("unused")
GradientAscent gaoptimizer = new GradientAscent();
@SuppressWarnings("unused")
ConjugateGradient optimizer = new ConjugateGradient(obj
.getNumParameters());
@SuppressWarnings("unused")
boolean success = optimizer.maximize(obj);
System.out.println("valCalls = " + obj.numValueCalls
+ " gradientCalls=" + obj.numGradientCalls);
return obj.tagger;
}