A movie recommendation system built with TensorFlow that uses collaborative filtering with neural networks to provide personalized movie recommendations.
This project implements a neural collaborative filtering approach to movie recommendations using the MovieLens dataset.
The system analyzes user-movie interactions to detect patterns in viewing preferences and makes personalized suggestions based on learned behaviors.
- ✅ Neural network-based collaborative filtering
- 🎯 Personalized recommendation generation
- 🧩 User and movie embedding visualization
- 🧹 Data preprocessing and exploration
- 🧠 Model training and evaluation
- 📊 Visualization of recommendation patterns
The recommendation engine is built with TensorFlow and uses:
- 🔗 Embedding layers for users and movies
- 🧱 Dense neural network layers for learning interaction patterns
- 🛡️ Regularization techniques to prevent overfitting
- 📉 Visualization tools to understand learned relationships
We use the MovieLens Small Dataset which includes:
- 100,000+ ratings
- 9,000+ movies
- 600+ users
- Ratings from 0.5 to 5.0
- Metadata: titles, genres, release years
from movie_recommender import MovieRecommender
recommender = MovieRecommender()
recommender.download_dataset() recommender.load_data()
train_data, val_data = recommender.prepare_training_data() history = recommender.train_model(train_data, val_data, epochs=10)
recommendations = recommender.get_movie_recommendations(user_id=42, top_n=10) print(recommendations)
- 📉 Mean Absolute Error (MAE): ~0.7 stars
- ✅ Recommendations verified through cross-validation
- 🌀 Meaningful clusters in movie embedding space
The t‑SNE visualization shows how the model clusters similar movies together in the latent embedding space.
Genres and themes naturally group, proving the model has learned useful representations.
- 🧠 Integration of content-based features
- 🧲 Implementation of attention mechanisms
- ❄️ Support for cold‑start problems
- 🌐 Simple web interface for live recommendations
tensorflow >= 2.8.0numpy >= 1.20.0pandas >= 1.3.0matplotlib >= 3.4.0seaborn >= 0.11.0scikit-learn >= 1.0.0requests >= 2.27.0
- MovieLens — for the dataset
- TensorFlow — for the deep learning framework
MIT — © 2026 Ranuk IT Solutions | ranuk.dev

