“How’s that movie?” — Neural collaborative filtering with FastAI

Build a state-of-the-art movie recommendation system with just 10 lines of code

Source: Unsplash and 3Blue1Brown

Collaborative filtering is a method of making predictions about the interests of a user by collecting preferences from many users. The underlying assumption is that if a person A has the same opinion as a person B on an issue, A is more likely to have B’s opinion on a different issue than that of a randomly chosen person. — Wikipedia

The MovieLens 100K Dataset

System Setup

pip install jovian --upgrade     # Install the jovian library 
jovian clone a1b40b04f5174a18bd05b17e3dffb0f0 # Download notebook
cd movielens-fastai # Enter the created directory
jovian install # Install the dependencies
conda activate movielens-fastai # Activate virtual environment
jupyter notebook # Start Jupyter

Preparing the data

Neural collaborative filtering model

Source: FastAI Lesson 4
Source: Wikipedia

Training the model

Looking at some predictions

Source: Netflix

Save and commit

Further Reading

--

--

Founder, Jovian

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store