Collaborative Filtering, collaborative filtering is the most common technique in recommender systems; it is to recommender systems what TF-IDF is to information retrieval.

As the saying goes, there are a hundred Hamlets in a hundred readers' eyes. Suppose we have ten thousand readers, each of whom may rate every book differently. Now a reader wants to know whether a certain book suits his taste; we should be able to give this new book a score for him. This score should be personalized.

A very simple method is to first check who has already rated this book, then see how similar those people's tastes are to this reader's. Give higher weights to those with higher similarity and lower weights to those with lower similarity, then combine them into a result.

Specifically, it is a weighted average of ratings.

How do we measure similarity? It's simple: look at the books that other reviewers and this reader have both rated; the similarity of their ratings reflects how similar their tastes are. In other words, just compute the cosine.

With such a simple calculation, we can estimate how much a person might like a new book.

For CF, I have a simple implementation here. If you're interested, take a look. This implementation is quite naive. Once I finish the graph database I'm writing, I'll make an optimized version on top of it. Whenever I have time...