static double eval() {
		double loss = 0;
		@SuppressWarnings("rawtypes")
		Iterator userIter = DataInfo.userTest.iterator();
		@SuppressWarnings("rawtypes")
		Iterator ItemIter = DataInfo.itemTest.iterator();
		@SuppressWarnings("rawtypes")
		Iterator rateIter = DataInfo.rateTest.iterator();
		
		
		while(userIter.hasNext() && ItemIter.hasNext() && rateIter.hasNext()) {
			int a = (Integer) userIter.next();
			int b = (Integer) ItemIter.next();
			double c = (Double) rateIter.next();
			
			double rate = predict(a, b) + DataInfo.mean_rating;
			
			if(rate < 0)
				rate = 0;
			if(rate > 5)
				rate = 5;
			
			rate = rate - c;
			loss += rate * rate;
			
			/*if(c == 0) {
				double x = -Math.log10(1-p);
				if(Double.isNaN(x)){
					System.err.println("real:  " + c + "    predict: " + p);
				}
				loss -= Math.log10(1-p);
			}
			else {
				double x = -Math.log10(p);
				if(Double.isNaN(x)){
					System.err.println("real:  " + c + "    predict: " + p);
				}
				loss -= Math.log10(p);
			}*/
		}
		
		return Math.sqrt(loss / DataInfo.userTest.size());
	}