Is this the correct way to apply a recommender system based on KNN and cosine similarity to predict continuous values?
The predicted rating is equal to the sum of each neighbors rating times similarity, then divided by 10 (number of neighbors).


You want to obtain a weighted-average of ratings, where the weight is the similarity score. Instead of dividing by 10 above, you should divide by the sum of similarities, to get a correct normalized score. Dividing by 10 is the likely reason for the predictions to be smaller than expected.

The formula you should use is:


  Final score = Sum_over_neighbours(Rating * Similarity) / Sum_over_neighbours(Similarity)