meh/recommender-systems-class-master
2021-07-07 20:03:54 +02:00
..
data meh 2021-07-07 20:03:54 +02:00
data_preprocessing meh 2021-07-07 20:03:54 +02:00
evaluation_and_testing meh 2021-07-07 20:03:54 +02:00
git_configuration meh 2021-07-07 20:03:54 +02:00
img meh 2021-07-07 20:03:54 +02:00
recommenders meh 2021-07-07 20:03:54 +02:00
__init__.py meh 2021-07-07 20:03:54 +02:00
.gitignore meh 2021-07-07 20:03:54 +02:00
class_2_numpy_pandas.ipynb meh 2021-07-07 20:03:54 +02:00
class_3_content_based_recommenders.ipynb meh 2021-07-07 20:03:54 +02:00
class_5_amazon_recommender.ipynb meh 2021-07-07 20:03:54 +02:00
class_6_collaborative_filtering.ipynb meh 2021-07-07 20:03:54 +02:00
class_12_pytorch.ipynb meh 2021-07-07 20:03:54 +02:00
class_13_generalized_matrix_factorization.ipynb meh 2021-07-07 20:03:54 +02:00
Class_1_Recommender_systems_introduction.pdf meh 2021-07-07 20:03:54 +02:00
Class_4_Content_based_recommenders.one meh 2021-07-07 20:03:54 +02:00
Class_4_Content_based_recommenders.pdf meh 2021-07-07 20:03:54 +02:00
Class_4_Recommender_systems_testing_and_evaluation.pdf meh 2021-07-07 20:03:54 +02:00
Class_5_Amazon_recommender.one meh 2021-07-07 20:03:54 +02:00
Class_5_Amazon_recommender.pdf meh 2021-07-07 20:03:54 +02:00
Class_6_Neighborhood_methods.one meh 2021-07-07 20:03:54 +02:00
Class_6_Neighborhood_methods.pdf meh 2021-07-07 20:03:54 +02:00
Class_7_Dimensionality_reduction_matrix_factorization.one meh 2021-07-07 20:03:54 +02:00
Class_7_Dimensionality_reduction_matrix_factorization.pdf meh 2021-07-07 20:03:54 +02:00
Class_8_9_10_Optimization.one meh 2021-07-07 20:03:54 +02:00
Class_8_9_10_Optimization.pdf meh 2021-07-07 20:03:54 +02:00
Class_8_Gomez_Uribe_Hunt_Netflix_Recommender_System_Algorithms_Business_Value_Innovation_2015.pdf meh 2021-07-07 20:03:54 +02:00
Class_8_Koren_Bell_Volinsky_Matrix_Factorization_Techniques_for_Recommender_Systems_2009.pdf meh 2021-07-07 20:03:54 +02:00
Class_11_Neural_networks.one meh 2021-07-07 20:03:54 +02:00
Class_11_Neural_networks.pdf meh 2021-07-07 20:03:54 +02:00
Class_13_He_Liao_Zhang_Nie_Hu_Chua_Neural_collaborative_filtering_2017.pdf meh 2021-07-07 20:03:54 +02:00
Class_14_YouTube_recommender.one meh 2021-07-07 20:03:54 +02:00
Class_14_YouTube_recommender.pdf meh 2021-07-07 20:03:54 +02:00
environment.yml meh 2021-07-07 20:03:54 +02:00
jupyter_test.ipynb meh 2021-07-07 20:03:54 +02:00
project_1_data_preparation.html meh 2021-07-07 20:03:54 +02:00
project_1_data_preparation.ipynb meh 2021-07-07 20:03:54 +02:00
project_1_recommender_and_evaluation.ipynb meh 2021-07-07 20:03:54 +02:00
project_2_recommender_and_evaluation.html meh 2021-07-07 20:03:54 +02:00
project_2_recommender_and_evaluation.ipynb meh 2021-07-07 20:03:54 +02:00
readme.md meh 2021-07-07 20:03:54 +02:00

Recommender Systems class

Department of Mathematics and Computer Science, Adam Mickiewicz University, 2021

Author: Piotr Zioło

Preparing your computer

  1. Install Anaconda with Python 3.8.

  2. Install Git.

  3. Install PyCharm (community version).

  4. Fork this repository to your GitHub account.

  5. Go to the chosen folder on your machine where you want to have a local copy of the repository. Right-click in the folder and from the context menu choose "Git Bash Here". Run the following command to clone the forked repository on your GitHub account to your local machine:

    git clone your_repository_address_which_you'll_find_in_your_github

    Alternatively, open Git Bash (installed with Git), change the path to the folder where you want to have a local copy of the repository, execute the above command.

  6. Prepare your conda environment (instructions given for Windows, but it should be similar on other systems):

    1. Open Anaconda Prompt as administrator.

    2. Make sure you're in the repository main folder. Run the following command:

       conda env create --name rs-class-env -f environment.yml
      

      You can replace rs-class-env with your own environment name.

      You may need to install a C++ compiler to install certain packages.

  7. In Git Bash open the repository folder and activate just created environment with the following command:

     conda activate rs-class-env
    
  8. In Git Bash type:

     jupyter notebook
    

    A new tab with Jupyter Notebook should open in your browser.

  9. In Jupyter Notebook open jupyter_test.ipynb.

  10. Click on the first cell and hit shift+enter. The first cell should get executed properly. Do the same for all other cells (you can continuously hit shift+enter until you execute all cells).

    The most common error you may encounter is "ImportError: No module named...". In such a case:

    • copy the package name,

    • close the tabs with Jupyter and in Git Bash where you started Jupyter Notebook click ctrl+c,

    • run the following command: pip install package_name

    • the package should get installed successfully,

    • after that you can open Jupyter Notebook again and test if it works now.

  11. After you finished a piece of code in your repository, run the following commands in Git Bash (in the repository folder):

    git add -A
    
    git commit -m "Commit message"
    
    git push
    

    The first command adds all changes and new files for the next commit. The second command commits your changes (it's a kind of a checkpoint/save to which you can later return if need be). The third one sends your commit to GitHub (or any remote repository, in general).

    Convention: For your commit messages use imperatives, e.g. "Do this, do that". Try to give informative one-liners.

  12. (Optional) Set up your Git Bash to make it look as below:

    Git Bash

    Copy .bash_profile and git-prompt.sh files from the git_configuration folder from this repository to your user folder (tested on Windows 10; on other systems they may need to land somewhere else).

  13. (Optional) Set up SSH on your machine for easier access to your GitHub repositories through Git. You can find tutorials on the internet how to do that.

    To additionally add an automatic prompt for SSH password in Git Bash, copy a script similar to .bashrc from the git_configuration folder to your user folder. In the file change the name of the key (in the given file there are two given; you can just leave one).

In the case of any problems, consult your best friend - StackOverflow.

Before every class

Fetch the new code from this repository and merge it into your code.

  1. In Git Bash open your repository folder.

  2. Add the original repository as an upstream:

     git remote add upstream git@github.com:PiotrZiolo/recommender-systems-class.git
    
  3. Fetch new changes from the original repository:

     git fetch upstream
    
  4. Merge the changes into your local branch (if you don't mind having your commits and commits in the original repository mixed up) or rebase the changes into your local branch (if you want your commits to follow all commits in the original repository):

     git merge upstream/master master
    

    or

     git rebase upstream/master
    
  5. In the case of conflicts you can resolve them manually, but it's easier to use PyCharm, especially in Jupyter Notebooks where manual merging is extremely painful. PyCharm provides side-by-side view of changes and allows to accept one of the conflicted file versions in one click.