Giter Club home page Giter Club logo

rl-playlist-generation's Introduction

rl-playlist-generation

Original implementation of "Automatic, Personalized, and Flexible Playlist Generation using Reinforcement Learning".

Dependencies

  • python3

You can check and install other dependencies in requirements.txt

$ pip3 install -r requirements.txt
# to install TensorFlow, you can refer to https://www.tensorflow.org/install/

Files you should prepare

Pretrain

The following are files you should prepare to train this playlist generation model. Besides, you can check sample files we prepare as a reference of formats.

data/raw/raw_data.txt

[date_of_created_playlist] [song_id1] [song_id2] ....

data/embedding.txt

# embedding: [value1 value2 value3 ...]
[song_id] [value1] [value2] [value3] ...

Reinforcement Learning

data/metrics.txt

[song_id] [popularity_score] [artist_id] [release_date]

Test

results/in.txt

[seed_song_id]

Usage

You can add argument --debug 1 for each mode to check everything is fine before you prepare your own data.

Prepare data

# files mentioned above should be created first
$ ./prepare_data.sh

Pretrain

$ python3 main.py --mode pretrain [--debug 1]

Reinforcement Learning

$ python3 main.py --mode rl [--debug 1]

Test

# input file: results/in.txt
# output file: results/out.txt
$ python3 main.py --mode test [--debug 1]

Other Arguments

If you would like some different settings for this model, you can refer to lib/config.py.

rl-playlist-generation's People

Contributors

shunyaoshih 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.