if (dialog.process()) {
double c = dialog.getC().getValue();
double g = dialog.getGamma().getValue();
SVM method = (SVM) file.getObject();
SVMTrain train = new SVMTrain((SVM) method, trainingData);
train.setC(c);
train.setGamma(g);
train.iteration();
double error = method.calculateError(trainingData);
if (EncogWorkBench.askQuestion("Training Done",
"Error: " + Format.formatPercent(error)
+ "\nSave training?")) {
file.save();