Tensorflow implementation of our method: "Triangle Graph Interest Network for Click-through Rate Prediction".

Related tags

Deep Learning tgin
Overview

TGIN

Tensorflow implementation of our method: "Triangle Graph Interest Network for Click-through Rate Prediction".

Files in the folder

  • dataset/
    • electronics/
      • uid_voc.pkl: users;
      • mid_voc.pkl: items;
      • cat_voc.pkl: categories;
      • item-info: mapping dict {item:category};
      • reviews-info: interaction records [user, item, rating, timestamp];
      • local_train_splitByUser: train data;
      • local_test_splitByUser: test data;
      • wnd3_alpha_01_theta_09_tri_num_10: triangles data with α=0.1 and θ=0.9;
  • triangle_data/: processed triangles data of the public datasets.
  • script/: implementations of TGIN.
  • triangle_mapreduce.zip: MapReduce implementations of triangle extraction and selection.

Prepare data

1. interaction data

We have processed the raw data and upload it to the electronics/ fold. You can use it directly.

Also, you can get the data from the amazon website and process it using the script:

sh prepare_data.sh

2. co-occurrence graph

You can use the processed triangles data directly, and just skip this step.

python script/gen_wnd_edges.py

3. triangle extraction and selection

We have extracted and selected the triangles of both amazon(books) and amazon(electronics) datasets. You can download and put it into the triangle_data/ folder.

Next, the triangle indexes should be transformed into the input format of the TGIN model.

python process_tridata.py

Also, you can refer to the MapReduce source code in triangle_mapreduce.zip folder to generate triangle indexes.

Train Model

(Recommended) You can skip all the previous steps and run the TGIN model using the script directly.

tar xvf triangle_data/electronics_triangle.tar.gz
tar xvf dataset/electronics.tar.gz 
python script/process_tridata.py

sh run.sh

Required packages

The code has been tested running under Python 2.7.18, with the following packages installed (along with their dependencies):

  • cPickle == 1.17
  • numpy == 1.16.6
  • keras == 2.0.8
  • tensorflow-gpu == 1.5.0

You might also like...
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!
Robust Video Matting in PyTorch, TensorFlow, TensorFlow.js, ONNX, CoreML!

Robust Video Matting (RVM) English | 中文 Official repository for the paper Robust High-Resolution Video Matting with Temporal Guidance. RVM is specific

Official PyTorch implementation for Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers, a novel method to visualize any Transformer-based network. Including examples for DETR, VQA.
Official PyTorch implementation for Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers, a novel method to visualize any Transformer-based network. Including examples for DETR, VQA.

PyTorch Implementation of Generic Attention-model Explainability for Interpreting Bi-Modal and Encoder-Decoder Transformers 1 Using Colab Please notic

A PyTorch implementation of EventProp [https://arxiv.org/abs/2009.08378], a method to train Spiking Neural Networks
A PyTorch implementation of EventProp [https://arxiv.org/abs/2009.08378], a method to train Spiking Neural Networks

Spiking Neural Network training with EventProp This is an unofficial PyTorch implemenation of EventProp, a method to compute exact gradients for Spiki

This is the official pytorch implementation of AutoDebias, an automatic debiasing method for recommendation.

AutoDebias This is the official pytorch implementation of AutoDebias, a debiasing method for recommendation system. AutoDebias is proposed in the pape

A Python implementation of the Locality Preserving Matching (LPM) method for pruning outliers in image matching.

LPM_Python A Python implementation of the Locality Preserving Matching (LPM) method for pruning outliers in image matching. The code is established ac

PyTorch implementation of Advantage Actor Critic (A2C), Proximal Policy Optimization (PPO), Scalable trust-region method for deep reinforcement learning using Kronecker-factored approximation (ACKTR) and Generative Adversarial Imitation Learning (GAIL). A PyTorch implementation of the baseline method in Panoptic Narrative Grounding (ICCV 2021 Oral)
A PyTorch implementation of the baseline method in Panoptic Narrative Grounding (ICCV 2021 Oral)

A PyTorch implementation of the baseline method in Panoptic Narrative Grounding (ICCV 2021 Oral)

Pytorch implementation of the unsupervised object discovery method LOST.
Pytorch implementation of the unsupervised object discovery method LOST.

LOST Pytorch implementation of the unsupervised object discovery method LOST. More details can be found in the paper: Localizing Objects with Self-Sup

Owner
Alibaba
Alibaba Open Source
Alibaba
Pytorch implementation of our method for high-resolution (e.g. 2048x1024) photorealistic video-to-video translation.

vid2vid Project | YouTube(short) | YouTube(full) | arXiv | Paper(full) Pytorch implementation for high-resolution (e.g., 2048x1024) photorealistic vid

NVIDIA Corporation 8.1k Jan 1, 2023
PyTorch implementation of our method for adversarial attacks and defenses in hyperspectral image classification.

Self-Attention Context Network for Hyperspectral Image Classification PyTorch implementation of our method for adversarial attacks and defenses in hyp

null 22 Dec 2, 2022
PyTorch implementation of our Adam-NSCL algorithm from our CVPR2021 (oral) paper "Training Networks in Null Space for Continual Learning"

Adam-NSCL This is a PyTorch implementation of Adam-NSCL algorithm for continual learning from our CVPR2021 (oral) paper: Title: Training Networks in N

Shipeng Wang 34 Dec 21, 2022
Code for our method RePRI for Few-Shot Segmentation. Paper at http://arxiv.org/abs/2012.06166

Region Proportion Regularized Inference (RePRI) for Few-Shot Segmentation In this repo, we provide the code for our paper : "Few-Shot Segmentation Wit

Malik Boudiaf 138 Dec 12, 2022
Code for our ALiBi method for transformer language models.

Train Short, Test Long: Attention with Linear Biases Enables Input Length Extrapolation This repository contains the code and models for our paper Tra

Ofir Press 211 Dec 31, 2022
Convolutional neural network web app trained to track our infant’s sleep schedule using our Google Nest camera.

Machine Learning Sleep Schedule Tracker What is it? Convolutional neural network web app trained to track our infant’s sleep schedule using our Google

g-parki 7 Jul 15, 2022
Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy.

Deploy tensorflow graphs for fast evaluation and export to tensorflow-less environments running numpy. Now with tensorflow 1.0 support. Evaluation usa

Marcel R. 349 Aug 6, 2022
TensorFlow Ranking is a library for Learning-to-Rank (LTR) techniques on the TensorFlow platform

TensorFlow Ranking is a library for Learning-to-Rank (LTR) techniques on the TensorFlow platform

null 2.6k Jan 4, 2023