public static final double[] EXPECTED_WEIGHTS2 = { 0.040412107263322006,1.6318492071769406,0.058742726390888546,0.43589204735120113,-0.5159917997643333,0.008112354095120074,-0.8555860696052167,0.07497410740247332,0.7668152092361858,0.9911552253200567,-0.8643149724379915,-0.26738946379986345,1.0788222265035896,0.3470739685034085,-0.8302594385878788,1.1248619976654748,0.7984891944426319,0.6841167879211988,-0.6059767178697457,-0.6729328356252361,-0.720851612348345,0.551830141185627 };
public void testRPROPConsistency() {
MLDataSet training = EncoderTrainingFactory.generateTraining(4, false);
BasicNetwork network = EncogUtility.simpleFeedForward(4, 2, 0, 4, true);
(new ConsistentRandomizer(-1,1,50)).randomize(network);
ResilientPropagation rprop = new ResilientPropagation(network,training);
for(int i=0;i<5;i++) {
rprop.iteration();
}
Assert.assertArrayEquals(EXPECTED_WEIGHTS1, network.getFlat().getWeights(),0.0001);