public static void errorRate(ArrayList<String[]> data, int n, TreeNode classifier) {
		int wrong = 0;
		for (String[] r : data) {
			if (predRow(r, classifier)) {
				if (!r[r.length-1].equals("yes") && !r[r.length-1].equals("A"))
					wrong++;
			} else {
				if (r[r.length-1].equals("yes") || r[r.length-1].equals("A"))
					wrong++;
			}
		}
		System.out.println((double) wrong/n);
		
	}