public static double entropyCal(ArrayList<ArrayList<String>> records){
		double entropy = 0;
		
		if(records.size() == 0) {
			return 0;
		}
		for(int i = 0; i < ID3.classVals; i++) {
			int count = 0;
			for(int j = 0; j < records.size(); j++) {
				ArrayList<String> record = records.get(j);
				if(record.get(ID3.indexOfClassLabel).equalsIgnoreCase(ID3.possClasses.get(i))) {
					count++;
				}
			}
				
			double probability = count / (double)records.size();
			if(count > 0) {
				entropy += -probability * (Math.log(probability) / Math.log(2));
			}
		}
		
		return entropy;
	}