private static HashMap<Long, Double> locationEntropyIDbased() {
		long t_start = System.currentTimeMillis();
		HashMap<Long, Double> loc_entro = new HashMap<Long, Double>();
		HashMap<Long, HashMap<Integer, Integer>> loc_user_visit = new HashMap<Long, HashMap<Integer, Integer>>();
		HashMap<Long, Integer> loc_total_visit = new HashMap<Long, Integer>();
		
		// 1. get the location visiting frequency
		for (User u : User.allUserSet.values()) {
			for (Record r : u.records) {
				// count individual user visiting
				if (loc_user_visit.containsKey(r.locID)) {
					if (loc_user_visit.get(r.locID).containsKey(u.userID)) {
						int freq = loc_user_visit.get(r.locID).get(u.userID);
						loc_user_visit.get(r.locID).put(u.userID, freq + 1);
					} else {
						loc_user_visit.get(r.locID).put(u.userID, 1);
					}
				} else {
					loc_user_visit.put(r.locID, new HashMap<Integer, Integer>());
					loc_user_visit.get(r.locID).put(u.userID, 1);
				}
				// count total visiting for one location
				if (loc_total_visit.containsKey(r.locID)) {
					int f = loc_total_visit.get(r.locID);
					loc_total_visit.put(r.locID, f+1);
				} else {
					loc_total_visit.put(r.locID, 1);
				}
			}
		}
		// 2. calculate the per user probability
		for (Long locid : loc_user_visit.keySet()) {
			double locEntropy = 0;
			for (int uid : loc_user_visit.get(locid).keySet()) {
				if (loc_user_visit.get(locid).size() > 1) {	// if there is only one user visit this locatin, then its entropy is 0, and there won't be any meeting events.
					if (loc_user_visit.get(locid).get(uid) > 0) {
						double prob = (double) loc_user_visit.get(locid).get(uid) / loc_total_visit.get(locid);
						locEntropy += - prob * Math.log(prob);
					}
				}
			}
			loc_entro.put(locid, locEntropy);
		}
		// 3. return the entropy
		long t_end = System.currentTimeMillis();
		System.out.println(String.format("Size of loc_entropy: %d.\n locationEntropyIDbased finished in %d seconds.", loc_entro.size(), (t_end - t_start)/1000));
		return loc_entro;
	}