-
Create python environment, e.g.,
conda create -n dgb python=3.9
-
Run
source install.sh
You can find all scripts in run.sh
data=UNtrade
n_runs=1
# TGN
method=tgn
prefix="${method}_attn"
python tgn/train_self_supervised.py -d $data --use_memory --prefix "$prefix" --n_runs "$n_runs" --gpu 0
# JODIE
method=jodie
prefix="${method}_rnn"
python tgn/train_tgn_regression.py -d $data --use_memory --memory_updater rnn --embedding_module time --prefix "$prefix" --n_runs "$n_runs" --gpu 0
# DyRep
method=dyrep
prefix="${method}_rnn"
python tgn/train_tgn_regression.py -d "$data" --use_memory --memory_updater rnn --dyrep --use_destination_embedding_in_message --prefix "$prefix" --n_runs "$n_runs" --gpu 0
# Just choose one of them is fine!
--max_normalization
--logarithmize_weights
--node_out_normalization
(--node_in_normalization)
--no_negative_sampling
--no_negative_sampling --fill_all_edges
--do_baseline
python gcn/train_gcn_regression.py -d "UNtrade"
and don't forget to add a normalization method.
data=UNtrade
n_runs=1
#baseline
python tgn/train_tgn_classification.py -d $data --use_memory --prefix "$prefix" --n_runs 1 --gpu 0 --n_epoch 1 --num_class 10 --do_baseline
# TGN
method=tgn
prefix="${method}_attn"
python tgn/train_tgn_classification.py -d $data --use_memory --prefix "$prefix" --n_runs "$n_runs" --gpu 0 --n_epoch 200 --num_class 10
# Jodie
method=jodie
prefix="${method}_rnn"
python tgn/train_tgn_classification.py -d $data --use_memory --memory_updater rnn --embedding_module time --prefix "$prefix" --n_runs "$n_runs" --gpu 0 --n_epoch 200 --num_class 10
#Dyrep
method=dyrep
prefix="${method}_rnn"
python tgn/train_tgn_classification.py -d "$data" --use_memory --memory_updater rnn --dyrep --use_destination_embedding_in_message --prefix "$prefix" --n_runs "$n_runs" --gpu 0 --n_epoch 200 --num_class 10
--no_negative_sampling
We would like to thank our supervisors Shenyang (Andy) Huang and Dr.Farimah Poursafaei for their kindly supports and the course lecturers Dr.Petar Veličković and Dr.Pietro Liò for their great teaching. We also thank the authors for providing the code access to DGB and TGN.