Giter Site home page Giter Site logo

cfdebug's Introduction

Code for NeurIPS'20 paper Trading Personalization for Accuracy: Data Debugging in Collaborative Filtering

Implicit feedback support added, see https://vkteam.medium.com/data-debugging-in-collaborative-filtering-with-implicit-feedback-does-it-work-97e37414a687

Requirements

python3
numpy
scipy
implicit
scikit-learn

Usage

Run debug process for explicit ALS on movielens python main.py --mode debug

Run debug process for implicit ALS on movielens python main.py --mode debug --implicit --alpha 5

Get metrics for explicit ALS on movielens python main.py --mode test

Get metrics process for implicit ALS on movielens python main.py --mode test --implicit --alpha 5

Here is the code fragment about the settings of hyperparameters.

parser.add_argument("--dataset", type=str, default="movielens", help="dataset")
parser.add_argument("--delim", type=str, default="::", help="delimiter of each line in the dataset file")
parser.add_argument("--fold", type=int, default=4, help="# of fold to split the data")
parser.add_argument("--factor", type=int, default=10, help="# of dimension parameter of the CF model")
parser.add_argument("--lambda_u", type=float, default=0.1, help="regularization parameter lambda_u of the CF model")
parser.add_argument("--lambda_v", type=float, default=0.1, help="regularization parameter lambda_v of the CF model")
parser.add_argument("--als_iter", type=int, default=15, help="# of iterations for ALS training")
parser.add_argument("--debug_iter", type=int, default=20, help="# of iterations in the debugging stage")
parser.add_argument("--debug_lr", type=float, default=0.05, help="learning rate in the debugging stage")
parser.add_argument("--retrain", type=str, default="full", help="the retraining mode in the debugging stage: full/inc")
parser.add_argument("--process", type=int, default=4, help="# of processes in the debugging stage")
parser.add_argument("--mode", type=str, default="debug", help="debug/test")
parser.add_argument("--implicit", action='store_true', help="use implicit ALS")
parser.add_argument("--alpha", type=int, default=1, help="confidence scaling for implicit feedback dataset")
parser.add_argument("--als_threads", type=int, default=6, help="num threads during implicit ALS fit")

cfdebug's People

Contributors

danila89 avatar dwyanesuarez avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.