@Test
	public void testFitLogic() {
		int s = 3;
		int[] h = new int[]{s*s,1};
		nr = new NeuralRegressor(h,.01,0,0);
		double[] input = new double[s*s];
		for (int i = 0; i < s*s*100000; i++) {
			boolean k = true;
			for (int j = 0; j < input.length; j++) {
				input[j] = r.nextInt(2);
				if (j%s==0)
					k &= input[j]>.5;
			}
			nr.fit(input, 0, k?1:0);
		}
		System.out.println(nr.toString());
		for (int i = 0; i < s*s*10; i++) {
			boolean k = true;
			for (int j = 0; j < input.length; j++) {
				input[j] = r.nextInt(2);
				if (j%s==0)
					k &= input[j]>.5;
			}
			double score = nr.predict(input)[0];
			if (score > .5 ^ k)
				fail(Arrays.toString(input) + " : " + score);
		}
	}