Skip to content

mingbocui/Recommender-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recommender System

Contents

  • README.MD (this)
  • submit
    • submission.csv (with RMSE of 1.025)
  • data
  • src
    • data_process.py (module for data preprocess and results submission)

    • SGD_helpers.py (module for SGD, mostly matching the lab)

    • MF_helpers.py (module for the bias matrix factorization and user-item ratings matrix)

    • run.py (main script for submiting the final results)

    • gs_reg_MF.py (script for grid search of the regularized matrix factorization)

    • gs_biased_MF.py (script for grid search of the regularized matrix factorization)

    • implement_surprise.py (script for cross validation using library surprise)

Submission

To run run.py:

  • On Mac/Windows :
    • Open the Terminal, enter the zipped folder, enter to the folder ./src/;
    • To execute in ./src/, enter : python run.py;
    • submission.py is generated in ../submit/;
    • item_feats_SGD.npy and user_feats_SGD.npy are stored in ../data/.

Codes

Prerequisites

  • Python 3.6+
  • Numpy
  • Scipy
  • Pandas

Note for running implement_surprise.py, some other libraries are required. Please refer to the script for details.

Introduction

  1. Notebook :

    • Recommender_MF.ipynb: recorded how we analyzed the user-item ratings matrix and how we implemented the regularized MF and the biased MF. The notebook is organized as follows:

      1. Load data, split the ratings matrix into training and testing set
      2. Statistics analysis
      3. Presentation of the MF methods used
      4. Grid search of the best parameters (This part has been reorganized in gs_reg_MF.py and gs_biased_MF.py)
      5. Compute the predictions
      6. Creation of csv file for the submission.
  2. Python modules :

    • data_process.py : This module transforms the data of a csv file into a sparse ratings matrix, split the data and functions to convert the final made predictions the correct format.

    • SGD_helpers.py : This module initialize the parameters for matrix factorization, compute RMSE and compute the SGD.

    • MF_helpers.py : This module computes the bias of users and items and computes the global average.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published