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