private static double remainder(String attribute,
			ArrayList<HashMap<String, String>> examples,
			HashMap<String, String[]> attributeValues, String goalAttribute) {
		double out = 0;
		for (String attrValue : attributeValues.get(attribute)) {
			ArrayList<HashMap<String, String>> examplesWValue = new ArrayList<HashMap<String, String>>();
			for (HashMap<String, String> example : examples) {
				if (example.get(attribute).equals(attrValue)) {
					examplesWValue.add(example);
				}
			}
			if (!examplesWValue.isEmpty()) {
				out += (double) examplesWValue.size() / examples.size()
						* H(examplesWValue, attributeValues, goalAttribute);
			}
		}
		return out;
	}