private double calculatePearson() {
		double total1 = 0, total2 = 0;
		for (int i = 0; i < itemIds.length; i++) {
			total1 += ratings1[i];
			total2 += ratings2[i];
		}
		double average1 = total1 / itemIds.length, average2 = total2 / itemIds.length;
		double numerator = 0, denominator1 = 0, denominator2 = 0;
		for (int i = 0; i < itemIds.length; i++) {
			double calc1 = ratings1[i] - average1, calc2 = ratings2[i] - average2;
			numerator += calc1 * calc2;
			denominator1 += calc1 * calc1;
			denominator2 += calc2 * calc2;
		}
		double denominator = Math.sqrt(denominator1 * denominator2);
		if (denominator == 0.0)
			return 0;
		else
			return numerator / denominator;
	}