private static HashMap<String, Double> locationEntropyGPSbased() {
		long t_start = System.currentTimeMillis();
		HashMap<String, Double> loc_entro = new HashMap<String, Double>();
		HashMap<String, HashMap<Integer, Integer>> loc_user_visit = new HashMap<String, HashMap<Integer, Integer>>();
		HashMap<String, Integer> loc_total_visit = new HashMap<String, Integer>();

		// 1. get the GPS visiting frequency
		for (User u : User.allUserSet.values()) {
			for (Record r : u.records) {
				// count individual user visiting
				if (loc_user_visit.containsKey(r.GPS())) {
					if (loc_user_visit.get(r.GPS()).containsKey(u.userID)) {
						int freq = loc_user_visit.get(r.GPS()).get(u.userID);
						loc_user_visit.get(r.GPS()).put(u.userID, freq + 1);
					} else {
						loc_user_visit.get(r.GPS()).put(u.userID, 1);
					}
				} else {
					loc_user_visit.put(r.GPS(), new HashMap<Integer, Integer>());
					loc_user_visit.get(r.GPS()).put(u.userID, 1);
				}
				// count total visiting for on location
				if (loc_total_visit.containsKey(r.GPS())) {
					int f = loc_total_visit.get(r.GPS());
					loc_total_visit.put(r.GPS(), f+1);
				} else {
					loc_total_visit.put(r.GPS(), 1);
				}
			}
		}
		// 2. calculate the per user probability
		for (String gps : loc_user_visit.keySet()) {
			double locEntropy = 0;
			for (int uid : loc_user_visit.get(gps).keySet()) {
				if (loc_user_visit.get(gps).size() > 1)
					if (loc_user_visit.get(gps).get(uid) > 0) {
						double prob = (double) loc_user_visit.get(gps).get(uid) / loc_total_visit.get(gps);
						locEntropy += - prob * Math.log(prob);
					}
			}
			loc_entro.put(gps, locEntropy);
		}
		// 3. return the entropy
		long t_end = System.currentTimeMillis();
		System.out.println(String.format("Size of loc_entropy: %d.\n locationEntropyGPSbased finished in %d seconds.", loc_entro.size(), (t_end - t_start)/1000));
		return loc_entro;
	}