protected static final float computePredictedRating(final float meanRating,final float userBaseline,final float itemBaseline,FloatMatrix user,FloatMatrix item,final int numRatings,FloatMatrix sumWeights,final float minRating,final float maxRating){
  float predicted=meanRating + userBaseline + itemBaseline+ item.dot(user.add(sumWeights.mul(1.0f / (float)(Math.sqrt(numRatings)))));
  predicted=Math.min(predicted,maxRating);
  predicted=Math.max(predicted,minRating);
  return predicted;
}

protected static final float computePredictedRating ( final float meanRating , final float userBaseline , final float itemBaseline , FloatMatrix user , FloatMatrix item , final int numRatings , FloatMatrix sumWeights , final float minRating , final float maxRating ) { float predicted = meanRating + userBaseline + itemBaseline + item . dot ( user . add ( sumWeights . mul ( 1.0f / ( float ) ( Math . sqrt ( numRatings ) ) ) ) ) ; predicted = Math . min ( predicted , maxRating ) ; predicted = Math . max ( predicted , minRating ) ; return predicted ; }
computes the predicted rating r between a user and an item based on the formula : r = b + q ^ t * ( p + ( 1 / sqrt ( n ) * sum ( y_i ) ) ) where b : the baseline estimate of the user for the item q : the item vector p : the user vector n : number of ratings of the user y_i : the weight vector
