@Test
	public void testFitAdvanced() {
		int[] h = new int[]{4,5,1};
		nr = new NeuralRegressor(h,.01,0,0);
		double[] input = new double[4];
		for (int i = 0; i < 4*4*10000; i++) {
			boolean k = false;
			for (int j = 0; j < input.length; j++) {
				input[j] = r.nextInt(2);
				k ^= input[j]>.5;
			}
			nr.fit(input, 0, k?1:0);
		}
		System.out.println(nr.toString());
		int I = 4*4*10;
		int error = 0;
		for (int i = 0; i < I; i++) {
			boolean k = false;
			for (int j = 0; j < input.length; j++) {
				input[j] = r.nextInt(2);
				k ^= input[j]>.5;
			}
			double score = nr.predict(input)[0];
			if (score > .5 ^ k)
				//fail(Arrays.toString(input) + " : " + score);
				error++;
		}
		double score = ((double) error) / I;
		if (score < .8)
			fail(""+score);
	}