public static void main(String args[]) throws IOException{
		try {
			GenData data = new GenData();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		HITS hits = new HITS();
		HashSet<User> users = new HashSet<User>(GenData.getUserMap().values());
		HashSet<Business> businesses = new HashSet<Business>(GenData.getBusinessMap().values());
		HITS.hitsScore(users, businesses);
		clusters = new HashMap<String, HashSet<String>> ();
		HashSet<Review> reviews = new HashSet<Review>(GenData.getReviewMap().values());
		fillUBStar(reviews);
		BufferedReader br = new BufferedReader(new FileReader("clusters.txt"));
		String newLine;
		while ((newLine = br.readLine()) != null) {
			StringTokenizer str = new StringTokenizer(newLine);
			String user = str.nextToken();
			//User user = GenData.userMap.get(userStr);
			HashSet<String> userCluster = new HashSet<String> ();
			while (str.hasMoreTokens()) {
				userCluster.add(str.nextToken());
			}
			clusters.put(user, userCluster);
		}
		br.close();
		int totalCnt = 0;
		int correctCnt = 0;
		for (HashSet<String> cluster : clusters.values()){
			for (String uid : cluster) {
				for (String bid:ubScore.getCounter(uid).keySet()) {
					if (othersHasBeenTo(cluster, bid, uid)) {
						totalCnt ++;
						if (Math.abs(getPredictedScore(uid, GenData.businessMap.get(bid),GenData.userMap) - ubScore.getCount(uid, bid)) <= 0.5) {
							correctCnt ++;
						}
					}
				}
			}
		}
	
		System.out.println("Result:");
		System.out.println(totalCnt);
		System.out.println(correctCnt);
		System.out.println((double)correctCnt/totalCnt);
		
		
	}