Recommender system for movies. Combination of static metrics and visual review of recommendations.
Includes the following algorithms:
- Recommendations by popularity
- Recommendations by movie descrition
- Item/Item collaborative filtering
- User/User collaborative filtering
- Regularized SVD
In the following, we will go through the steps to set up this system.
The first thing is to download this repository. Secondly, create a themoviedb.org ID needed to run the website.
You have two choices for downloading the source code – downloading a zip file of the source code or using Git.
-
Downloading a zip file
From the main directory on GitHub, click the green “Clone or download” button and choose to download a zip file to your computer.
-
Using Git
Clone this repository or create a fork in your GitHub, and then clone that instead. The following command will create a copy on your computer.
> git clone https://github.com/jug2505/recommender.git
Before you run the code, create a virtual environment.
> cd back
> virtualenv -p python3 venv
> source venv/bin/activate
pip3 install -r requirements.txt
Open rs_project/settings.py
Update this lines:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'moviegeek',
'USER': 'db_user',
'PASSWORD': 'db_user_password',
'HOST': 'db_host',
'PORT': 'db_port_number',
}
}
Run the following commands:
> python3 manage.py makemigrations
> python3 manage.py migrate --run-syncdb
Run the following scripts to download the datasets for the system.
> python3 -m scripts.dataset_downloaders.movies_downloader
> python3 -m scripts.dataset_downloaders.raitings_downloader
> python3 -m scripts.dataset_downloaders.description_downloader
Run all scripts in scripts/calculators folder.
Run scripts/statistic/metrics.py script. It includes RMSE and Precision at K metrics.
sudo service postgresql start
> python3 manage.py runserver 127.0.0.1:8081
npm install
npm run serve