GithubHelp home page GithubHelp logo

yuyuzka / getnext Goto Github PK

View Code? Open in Web Editor NEW

This project forked from songyangme/getnext

0.0 0.0 0.0 44.49 MB

Code for paper "GETNext: Trajectory Flow Map Enhanced Transformer for Next POI Recommendation"

Python 100.00%

getnext's Introduction

GETNext

This is the pytorch implementation of paper "GETNext: Trajectory Flow Map Enhanced Transformer for Next POI Recommendation"

model-structure

Installation

pip install -r requirements.txt

Requirements

torch==1.7.1
numpy==1.19.2
prettytable==2.0.0
matplotlib==3.3.4
scipy==1.6.1
torch_summary==1.4.5
tqdm==4.58.0
pandas==1.1.5
data==0.4
PyYAML==6.0
scikit_learn==1.0.2
torchsummary==1.5.1

Train

  • Unzip dataset/NYC.zip to dataset/NYC. The three files are training data, validation data, test data.

  • Run build_graph.py to construct the user-agnostic global trajectory flow map from the training data.

  • Train the model using python train.py. All hyper-parameters are defined in param_parser.py

    python train.py --data-train dataset/NYC/NYC_train.csv
                    --data-val dataset/NYC/NYC_val.csv
                    --time-units 48 --time-feature norm_in_day_time
                    --poi-embed-dim 128 --user-embed-dim 128 
                    --time-embed-dim 32 --cat-embed-dim 32
                    --node-attn-nhid 128    
                    --transformer-nhid 1024
                    --transformer-nlayers 2 --transformer-nhead 2
                    --batch 16 --epochs 200 --name exp1
    

Citation

@inproceedings{10.1145/3477495.3531983,
  author = {Yang, Song and Liu, Jiamou and Zhao, Kaiqi},
  title = {GETNext: Trajectory Flow Map Enhanced Transformer for Next POI Recommendation},
  booktitle = {Proceedings of the 45th International ACM SIGIR Conference on Research and Development in Information Retrieval},
  pages = {1144โ€“1153},
  series = {SIGIR '22}
}

getnext's People

Contributors

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