// second, create the data set
MLDataSet dataSet = new BasicMLDataSet(XOR_INPUT, XOR_IDEAL);
// third, create the trainer
MLTrainFactory trainFactory = new MLTrainFactory();
MLTrain train = trainFactory.create(method,dataSet,trainerName,trainerArgs);
// reset if improve is less than 1% over 5 cycles
if( method instanceof MLResettable && !(train instanceof ManhattanPropagation) ) {
train.addStrategy(new RequiredImprovementStrategy(500));
}