1: Introduction
2: Recommendation systems
3: Item-based filtering
4: Classification
5: More on classification
6: Naïve Bayes
7: Unstructured text
8: Clustering


  • How a recommendation system works.
  • How social filtering works
  • How to find similar items
  • Manhattan distance
  • Euclidean distance
  • Minkowski distance
  • Pearson Correlation Coefficient
  • Cosine similarity
  • Implementing k-nearest neighbors in Python
  • The Book Crossing dataset

The PDF of the Chapter

Python code

The code for the initial Python example:

The code for the Pearson implementation:

The code for the Python recommender class:

Confused about how to run this code in Python? Check out this short getting started video.


The Book Crossing Data:

Movie Ratings (20 movies rated on a scale of 1-5; a blank means that person didn’t see that movie). .