Skip to content
Awais Asghar.
AI & Machine Learning2025

Hybrid Movie Recommender

Content-based, collaborative and hybrid recommenders for 2015–2025 releases.

Collects movie data through APIs and scraping, engineers features, models text with TF-IDF, factorizes the rating matrix and fuses both scores into a hybrid recommender. Includes exploratory analysis and RMSE evaluation for the collaborative model.

Hybrid Movie Recommender thumbnail

README · rendered from GitHub

Hybrid Movie Recommender System

Status Python Machine Learning TMDB MovieLens License


Project Overview

This project implements a Movie Recommender System using Content-Based Filtering, Collaborative Filtering, and a Hybrid Recommendation approach. The system focuses on high-rated movies released between 2015 and 2025 and leverages both movie metadata and user–movie interaction data to generate accurate and personalized recommendations.

Image Image Image

Objectives

  • Build a content-based recommender using movie metadata
  • Build a collaborative filtering model using user ratings
  • Combine both approaches into a hybrid recommender system
  • Evaluate recommendation quality using ranking-based metrics
Image

Dataset Description

Data Sources

  • TMDB API – Movie metadata (titles, overview, genres, cast, keywords)
  • MovieLens Dataset – User–movie rating interactions
  • IMDb (Scraping) – Scraping pipeline implemented (reviews optional)

Filtering Criteria

  • Release years: 2015–2025
  • Minimum rating: 6.0
  • Minimum vote count: 50

Generated Files

File NameDescription
movies_2015_2025.csvRaw movie metadata from TMDB
movies_tmdb_enriched.csvEnriched metadata (genres, cast, keywords)
ratings_for_cf.csvUser–movie ratings for collaborative filtering
movies_master.csvFinal dataset with combined textual features
Image Image Image

Methodology

Image Image Image Image

1. Content-Based Filtering

  • Feature engineering using movie overview, genres, keywords, cast
  • Unified text feature: combined_text
  • TF-IDF vectorization
  • Cosine similarity for movie-to-movie recommendations

2. Collaborative Filtering

  • User–item interaction matrix from MovieLens
  • Matrix factorization (SVD) using Surprise library
  • Personalized rating prediction

3. Hybrid Recommendation

  • Weighted fusion of content-based and collaborative scores
  • Fusion parameter α controls contribution of each model

Final Score = α × Content Score + (1 − α) × Collaborative Score

Image Image Image

Evaluation Metrics

The system was evaluated using ranking-based and prediction metrics:

  • HitRate@5
  • HitRate@10
  • MRR@5
  • RMSE (for collaborative filtering)
Image

Performance Highlights

  • HitRate@10 ≈ 0.95
  • HitRate@5 ≈ 0.92
  • MRR@5 ≈ 0.90
  • Best performance achieved at α ≈ 0.7–0.9
  • Hybrid model significantly outperformed collaborative-only (Surprise) baseline
Image

Tools and Technologies

  • Programming Language: Python
  • Libraries: Pandas, NumPy, Scikit-learn, Surprise
  • Data Sources: TMDB API, MovieLens
  • Web Scraping: BeautifulSoup
  • Visualization: Matplotlib
  • Environment: Kaggle, Jupyter Notebook
  • Version Control: Git, GitHub

Ethical Considerations

  • Only public and academic datasets were used
  • Ethical and rate-limited web scraping
  • No personal or sensitive user data collected
  • Project developed strictly for educational purposes
Image

Future Work

  • Deep learning–based recommenders (Neural CF, embeddings)
  • Real-time user feedback integration
  • Web or mobile application deployment
  • Larger and multilingual datasets
Image

Authors

  • Awais Asghar
  • Ahmad Hussain
  • M. Hammad Sarwar

⭐ Acknowledgments

  • TMDB for providing the movie metadata API
  • GroupLens Research for the MovieLens dataset

⭐ If you find this project useful, feel free to the repository ⭐

Image

More in AI / ML

Related projects

See all
  • AI / ML2025

    RecycleVision

    EfficientNetB0 transfer learning sorts waste into six recyclable categories.

    • Python
    • TensorFlow
    • Keras
    • EfficientNetB0