BufferedMLDataSet buffer = null;
MLDataSet useTraining = this.training;
if (this.training instanceof BufferedMLDataSet) {
buffer = (BufferedMLDataSet) this.training;
useTraining = buffer.openAdditional();
}
// train the neural network
double error = Double.POSITIVE_INFINITY;