private void compareMovies() {
		for (Map.Entry<Integer, HashSet<Integer>> movie1 : usersByMovie.entrySet()) {
			LinkedHashMap<Integer, Double> comparedMovies = new LinkedHashMap<Integer, Double>();
			for (Map.Entry<Integer, HashSet<Integer>> movie2 : usersByMovie.entrySet()) {

				// Only calculate similarities for half of the matrix since
				// sim(movie1, movie2 == sim(movie2, movie1)
				if (movie1.getKey() > movie2.getKey()) {

					double sim = computeSimilarity(movie1.getKey(), movie2.getKey());

					if (similarities.containsKey(movie1.getKey())) {
						similarities.get(movie1.getKey()).put(movie2.getKey(), sim);
					} else {
						LinkedHashMap<Integer, Double> s = new LinkedHashMap<Integer, Double>();
						s.put(movie2.getKey(), sim);
						similarities.put(movie1.getKey(), s);
					}

					if (similarities.containsKey(movie2.getKey())) {
						similarities.get(movie2.getKey()).put(movie1.getKey(), sim);
					} else {
						LinkedHashMap<Integer, Double> s = new LinkedHashMap<Integer, Double>();
						s.put(movie1.getKey(), sim);
						similarities.put(movie2.getKey(), s);
					}
				}
				comparedMovies.put(movie2.getKey(), computeSimilarity(movie1.getKey(), movie2.getKey()));
			}
			similarities.put(movie1.getKey(), comparedMovies);
		}
	}