All Projects → allenjack → Hgn

allenjack / Hgn

Licence: mit
Hierarchical Gating Networks for Sequential Recommendation

Projects that are alternatives of or similar to Hgn

Isl Python
Solutions to labs and excercises from An Introduction to Statistical Learning, as Jupyter Notebooks.
Stars: ✭ 108 (-1.82%)
Mutual labels:  jupyter-notebook
Ml Da Coursera Yandex Mipt
Machine Learning and Data Analysis Coursera Specialization from Yandex and MIPT
Stars: ✭ 108 (-1.82%)
Mutual labels:  jupyter-notebook
Mtcnn
MTCNN face detection implementation for TensorFlow, as a PIP package.
Stars: ✭ 1,689 (+1435.45%)
Mutual labels:  jupyter-notebook
Woe And Iv
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Deeplearning.ai Convolutional Neural Networks
Completed assignment jupyter notebook of Foundations of Convolutional Neural Networks, deeplearning.ai coursera course
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Prisma abu
用机器学习做个艺术画家-Prisma
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Imagenetv2
A new test set for ImageNet
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Leetcode Course
A guide to crushing tech interviews.
Stars: ✭ 110 (+0%)
Mutual labels:  jupyter-notebook
Nb pdf template
A more accurate representation of jupyter notebooks when converting to pdfs.
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Densecap
Dense image captioning in Torch
Stars: ✭ 1,469 (+1235.45%)
Mutual labels:  jupyter-notebook
Histbook
Versatile, high-performance histogram toolkit for Numpy.
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Street to shop experiments
Stars: ✭ 108 (-1.82%)
Mutual labels:  jupyter-notebook
Credit score
data from the kaggle 'give me some credit" competition
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Simple mf
Simple but Flexible Recommendation Engine in PyTorch
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Kubeflowdojo
Repository to hold code, instructions, demos and pointers to presentation assets for Kubeflow Dojo
Stars: ✭ 110 (+0%)
Mutual labels:  jupyter-notebook
Solvingalmostanythingwithbert
BioBert Pytorch
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Alexnet Experiments Keras
Code examples for training AlexNet using Keras and Theano
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook
Sklearn
Data & Code associated with my tutorial on the sci-kit learn machine learning library in python
Stars: ✭ 110 (+0%)
Mutual labels:  jupyter-notebook
Nvidia Gpu Tensor Core Accelerator Pytorch Opencv
A complete machine vision container that includes Jupyter notebooks with built-in code hinting, Anaconda, CUDA-X, TensorRT inference accelerator for Tensor cores, CuPy (GPU drop in replacement for Numpy), PyTorch, TF2, Tensorboard, and OpenCV for accelerated workloads on NVIDIA Tensor cores and GPUs.
Stars: ✭ 110 (+0%)
Mutual labels:  jupyter-notebook
Spark R Notebooks
R on Apache Spark (SparkR) tutorials for Big Data analysis and Machine Learning as IPython / Jupyter notebooks
Stars: ✭ 109 (-0.91%)
Mutual labels:  jupyter-notebook

The HGN model for Sequential Recommendation

The implementation of the paper:

Chen Ma, Peng Kang, and Xue Liu, "Hierarchical Gating Networks for Sequential Recommendation", in the 25th ACM SIGKDD Conference on Knowledge Discovery and Data Mining (KDD 2019)

Arxiv: https://arxiv.org/abs/1906.09217

Please cite our paper if you use our code. Thanks!

Author: Chen Ma ([email protected])

Feel free to send me an email if you have any questions.

Bibtex

@inproceedings{DBLP:conf/kdd/MaKL19,
  author    = {Chen Ma and
               Peng Kang and
               Xue Liu},
  title     = {Hierarchical Gating Networks for Sequential Recommendation},
  booktitle = {{KDD}},
  pages     = {825--833},
  publisher = {{ACM}},
  year      = {2019}
}

Environments

  • python 3.6
  • PyTorch (version: 1.0.0)
  • numpy (version: 1.15.0)
  • scipy (version: 1.1.0)
  • sklearn (version: 0.19.1)

Dataset

In our experiments, the movielens-20M dataset is from https://grouplens.org/datasets/movielens/20m/, the Amazon-CDs and Amazon-Books datasets are from http://jmcauley.ucsd.edu/data/amazon/, the GoodReads-Children and GoodReads-Comics datasets are from https://sites.google.com/eng.ucsd.edu/ucsdbookgraph/home. (If you need the data after preprocessing, please send me an email).

The XXX_tem_sequences.pkl file is a list of lists that stores the inner item id of each user in a chronological order, e.g., user_records[0]=[item_id0, item_id1, item_id2,...].

The XXX_user_mapping.pkl file is a list that maps the user inner id to its original id, e.g., user_mapping[0]=A2SUAM1J3GNN3B.

The XXX_item_mapping.pkl file is similar to XXX_user_mapping.pkl.

Example to run the code

Data preprocessing:

The code for data preprocessing is put in the /preprocessing folder. Amazon_CDs.ipynb provides an example on how to transform the raw data into the .pickle files that used in our program.

Train and evaluate the model (you are strongly recommended to run the program on a machine with GPU):

python run.py

Another implementation

Kindly thank Liwei Wu for another implementation with a different evaluation strategy: https://github.com/wuliwei9278/HGN_baseline.

Acknowledgment

The sequence segmentation (interactions.py) is heavily built on Spotlight. Thanks for the amazing work.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].