Final-year project
Movie Recommendation System in Python
A recommendation project that suggests movies with two methods, content-based similarity and collaborative filtering from user ratings, built on the public MovieLens dataset with a simple web interface.
PythonpandasNumPyscikit-learnStreamlit or Flask
The problem
Streaming apps have far more titles than anyone can browse, so they recommend what each user is likely to enjoy. This project builds the two classic approaches and compares them.
The MovieLens datasets from GroupLens Research are free for research and education. The small version has about 100,000 ratings from 600 users on 9,000 movies, which runs comfortably on a laptop. Read the dataset's licence and cite it in your report.
Features to build
- Load and explore movies and ratings: most rated movies, rating distribution and genres
- Content-based recommendations: movies similar to a chosen movie using genres and tags with TF-IDF and cosine similarity
- Collaborative filtering: recommendations for a user from users with similar ratings, or from item-to-item similarity
- Handle new users with no ratings by showing popular, well-rated movies
- Evaluate with a train and test split of ratings, using a metric such as RMSE or precision at 10
- A web page where you pick a movie or a user and see the top 10 recommendations
Build plan
- 1
Explore the data
Merge movies and ratings with pandas, look at how many ratings each movie and user has, and notice that most movies have very few ratings.
- 2
Popularity baseline
Rank movies by average rating with a minimum number of ratings. This is your baseline and your answer for new users.
- 3
Content-based method
Build a TF-IDF matrix from genres and tags and use cosine similarity to find the movies closest to a chosen one.
- 4
Collaborative filtering
Build a user and movie rating matrix with pivot tables, compute similarities between movies from their ratings, and recommend unseen movies a user is likely to rate highly.
- 5
Evaluation
Hide some of each user's ratings, predict them or recommend from the rest, and compare methods with the same metric.
- 6
Interface
Build a simple Streamlit or Flask page with a movie search box and a user selector.
- 7
Report
Explain both methods with small worked examples, show the comparison, and discuss the cold-start problem and popularity bias.
Learn these first
Each part of the project is taught in one of these free lessons.
- pandas merge Explained: Inner, Left, Right and Outer Joins
- pandas Pivot Tables and Crosstabs (Like Excel Pivot Tables)
- pandas groupby Explained: Group, Aggregate and Transform
- NumPy Vectorisation and Broadcasting Explained
- Text Classification in Python: Bag of Words and TF-IDF
- Embeddings and Semantic Search Explained (with Python)
- Features, Labels and train_test_split in scikit-learn
- Regression Metrics: MAE, MSE, RMSE, R² and MAPE Explained
Make it stand out
- Matrix factorisation with a library such as Surprise, compared with the simple methods
- A hybrid that mixes content and collaborative scores
- Explain each recommendation, for example 'because you liked …'
- Use the larger MovieLens dataset and measure speed
Viva and interview questions
Try to answer each one aloud before you open it.
What is the difference between content-based and collaborative filtering?
Content-based filtering recommends items similar to what you liked, using the items' own features such as genre. Collaborative filtering uses other users' behaviour: people who rated things like you also liked these movies. It needs no item features but needs plenty of ratings.
What is the cold-start problem?
A new user has no ratings and a new movie has no ratings, so collaborative filtering cannot place them. I show popular, well-rated movies to new users, and content-based similarity works for new movies.
What is cosine similarity?
It measures the angle between two vectors, ignoring their length. Vectors pointing the same way have similarity 1. It suits TF-IDF and rating vectors because it compares the pattern, not the size.
Why use a minimum number of ratings for the popularity list?
A movie with one 5-star rating has a perfect average but tells us almost nothing. Requiring, say, 50 ratings makes the average reliable.
How did you evaluate the recommendations?
I hid a part of each user's ratings as a test set, built recommendations from the rest, then measured how well the predictions matched the hidden ratings (RMSE) or how many of the top 10 the user had actually rated highly (precision at 10).
What to put in your project report
- Abstract: the problem, your solution and the result in one paragraph.
- Introduction and problem statement: who has the problem and why it matters.
- Requirements: the features (functional) and qualities such as speed and security (non-functional).
- Design: architecture diagram, database tables or data flow, and screen layouts.
- Implementation: the main modules and the most interesting code, explained.
- Testing: the test cases you ran, with inputs, expected and actual results.
- Results: screenshots or numbers that show the project working.
- Conclusion and future scope: what you achieved and what you would add next.
Your college may give its own format. Follow that first, and use this list to check nothing is missing.
More project ideas
- Crop Recommendation System with Machine LearningFinal-year project
- SMS Spam Detection with Machine LearningFinal-year project
- Student Performance Prediction with Machine LearningFinal-year project