public static double infoGain(ArrayList<String[]> data, int x, int y) {
		int[] xCount = new int[2];
		int[] yCount = new int[2];
		int[] yCond = new int[4];
		int rowCount = 0;
		if (data.size() == 0)
			return 0.0;
		String xPlus = data.get(0)[x];
		String yPlus = data.get(0)[y];
		for (String[] row : data) {
			rowCount++;
			if (row[x].equals(xPlus)) {
				xCount[0]++;
				if (row[y].equals(yPlus)) {
					yCount[0]++;
					yCond[0]++;
				}
				else {
					yCount[1]++;
					yCond[1]++;
				}
			}
			else {
				xCount[1]++;
				if (row[y].equals(yPlus)) {
					yCount[0]++;
					yCond[2]++;
				}
				else {
					yCount[1]++;
					yCond[3]++;
				}
			}
		}
		double px = (double) xCount[0]/rowCount;
		double py = (double) yCount[0]/rowCount;
		double py0 = (double) yCond[0]/xCount[0];
		double py1 = (double) yCond[2]/xCount[1];
		return entropy(py) - px*entropy(py0) - (1-px)*entropy(py1);
	}