new ActivationFunction[] { LINEAR.get(), SIGMOID.get(),
SIGMOID.get() }, new LogisticErrorFunction(), new Fmincg(), 100)
.build();
Tuple<DoubleVector[], DoubleVector[]> sampleXOR = sampleXOR();
double error = mlp.train(sampleXOR.getFirst(), sampleXOR.getSecond(),
new ParticleSwarmOptimization(1000, 2.8d, 0.2, 0.4, 4), 400, 0.0d,
false);
System.out.println(error);
if (error < 0.01) {
assertTrue(error < 0.001);
validatePredictions(sampleXOR, mlp);