@Test
	public void testFit() {
		int[] h = new int[]{4,4};
		nr = new NeuralRegressor(h,.2,0,.1);
		double[] input = new double[4];
		for (int i = 0; i < 4*4*100; i++) {
			for (int j = 0; j < input.length; j++)
				input[j] = r.nextInt(2);
			int a = r.nextInt(input.length);
			nr.fit(input, a, input[a]);
		}
		System.out.println(nr.toString());
		for (int i = 0; i < 4*4*10; i++) {
			for (int j = 0; j < input.length; j++)
				input[j] = r.nextInt(2);
			double[] score = nr.predict(input);
			for (int j = 0; j < input.length; j++)
				if (input[j] > .5 ^ score[j] > .5)
					fail(Arrays.toString(input) + " : " + Arrays.toString(score));
		}
	}