Giter Club home page Giter Club logo

sbr-framework-difficult-case-study's Introduction

Data Preparation:

1- Download the Amazon Review Data (reviews ane metadata) for Books from https://nijianmo.github.io/amazon/index.html. You should have obtained "Books.json.gz" and "meta_Books.json.gz".

2- Obtain the data splits with user and item ids from https://personalization.mpi-inf.mpg.de/SBR_DATA/ .

3- Run the script scripts/prepare_dataset_files.py after editing it with the path pointing to the downloaded data. It should create files: train.csv, items.csv, users.csv

4- You should have the following files in the same directory: train.csv, validation.csv, test.csv, items.csv, users.csv, and the files with negative samples.

Pre-compute user and item textual representations:

After editing configs/precompute.json file by adding the dataset_path, run the following python scripts: python precompute_user_item_chunk_reps_no_prec.py --config_file configs/precompute.json --which user; python precompute_user_item_chunk_reps_no_prec.py --config_file configs/precompute.json --which item

For BERT+CF model, you need to have a trained CF model and edit config/precompute_cf.json and run the scripts using the mentioned config file.

Train:

After editing configs/bert5_uniform.json or other config files with different training negative sampling, run: python main.py --config_file configs/configs/bert5_uniform.json --op train;

Evaluate:

To run the test run the following script: python main.py --result_folder <PATH_TO_EXP_RESULT> --op test --testtime_test_neg_strategy f:<FILENAME_EXAMPLE:test_negatives_profile_based_evaluation_100>;

sbr-framework-difficult-case-study's People

Contributors

ghazalehnt avatar

Watchers

 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.