Data & AI Project
Movie Recommendation Engine
A recommendation engine teaches similarity, matrix factorisation and — most importantly — evaluation. The modelling is the easy half; the hard half is measuring whether recommendations are actually good, and handling a new user the model has never seen.
The brief
Given a ratings dataset, recommend films to a user. Implement both a content-based and a collaborative approach, evaluate them against a held-out set, and handle a user with no history at all.
What it demonstrates
That you can evaluate a model honestly, and that you recognise cold start — the failure mode every recommender meets on day one.
What "done" looks like
Build all of these and the project is finished. Anything past that is in the stretch goals.
- Content-based recommendations from item features
- Collaborative filtering from the ratings matrix
- Offline evaluation against a held-out set
- A cold-start path for users and items with no history
- An API returning top-k recommendations
- A written comparison of the two approaches
How to build it
- 1
Explore the ratings data
Sparsity, rating distribution, users per item. This shapes every modelling decision that follows.
- 2
Split correctly
Hold out by user and by time, not at random. A random split leaks the future into training and inflates every metric.
- 3
Build the content-based model
Vectorise genres and descriptions, then rank by cosine similarity. Simple, and it handles brand-new items.
- 4
Build the collaborative model
Matrix factorisation over the ratings. This is what finds the recommendations a content model never would.
- 5
Evaluate on ranking
precision@k and recall@k, not RMSE. You are ranking a list, not predicting a number.
- 6
Handle cold start explicitly
Popularity fallback, onboarding preferences, or content similarity. Say in the README which you chose and why.
- 7
Serve it
A FastAPI endpoint returning top-k for a user id, with the model loaded once at startup rather than per request.
- 8
Write up the comparison
Where each approach won, where it failed, and what you would ship. This is the part that gets read.
Once it works
Only after the definition of done is met. Half-finished ambition reads worse than a small finished thing.
- Blend both models and measure whether the hybrid actually wins
- Add diversity and novelty metrics, not just accuracy
- Add implicit feedback — views and clicks rather than ratings
Frequently Asked Questions
Content-based or collaborative filtering?
Build both — they fail in opposite ways. Content-based works for a new item but never surprises anyone; collaborative surprises well but cannot handle a new user or a new film. Real systems blend them, and explaining why is the point of the project.
How do I evaluate recommendations?
Hold out ratings and measure precision@k and recall@k rather than RMSE — ranking is what matters, not predicted score. Say clearly that offline metrics only approximate real satisfaction; the honest caveat is worth more than a confident number.
What is the cold-start problem?
A new user or item has no interaction history, so collaborative filtering has nothing to work from. Handle it explicitly — popularity fallback, onboarding preferences or content-based similarity — because an interviewer will ask, and "I did not consider it" is the wrong answer.