In our everyday lives, we often seek recommendations from friends who share similar tastes when it comes to products, movies, and more. We tend to trust recommendations from those with similar preferences. Collaborative filtering aims to replicate this concept by finding similarities between users and leveraging their preferences. Collaborative filtering is at the core of recommendation engines. It analyzes data about users with similar tastes and predicts the likelihood of an individual enjoying something.
The primary objective of this project is to build a Recommender system using a variety of Model-Based and Memory-Based collaborative filtering techniques.
This dataset contains transactional records from a UK-based non-store online retail company. The company specializes in selling unique all-occasion gifts.
- Language:
Python
- Libraries:
sklearn
,surprise
,pandas
,matplotlib
,scipy
,numpy
,pickle
- Data Description: Understand the dataset.
- Data Cleaning: Prepare the data for analysis.
- Memory-Based Approach:
- User-to-User Collaborative Recommendation
- Item-to-Item Collaborative Recommendation
- Models:
- KNN model
- Non-negative Matrix Factorization (NMF)
- Co-Clustering model
- Evaluation Metrics:
- Root mean square error
- Mean absolute error
- Cross-validation score
input
: Contains the data for analysis (e.g.,Rec_sys_data.xlsx
).src
: This is the heart of the project, containing modularized code for each step, organized as follows:ML_pipeline
: Functions organized in different Python files.engine.py
: Main script calling the functions from theML_pipeline
folder.
output
: Contains the best-fitted model trained for the data, ready for future use.lib
: A reference folder containing the original IPython notebook used in the project.requirements.txt
: Lists all the required libraries with their respective versions. Install these libraries withpip install -r requirements.txt
.