Data management for ITSTGCN

Author

SEOYEON CHOI

Published

July 5, 2023

  1. 순환형 구조를 가진 모델(Models with recurrent structures):
  1. 그래프 합성곱 모델(Graph convolution models):
  1. 동적 값 업데이트를 활용한 모델(Models utilizing dynamic value updates):

논문에서 제안하는 방법은 GConvGRU (Chebyshev Graph Convolutional Gated Recurrent Unit Cell)와 GConvLSTM (Graph Convolutional Recurrent Network)이라는 두 가지 모델을 소개합니다. GConvGRU는 그래프 데이터에 대한 시간적인 의존성을 캡처하는데 사용되며, GConvLSTM은 그래프와 시퀀스 데이터를 동시에 처리하는데 활용됩니다.

GConvGRU는 Chebyshev 그래프 합성곱과 Gated Recurrent Unit (GRU)을 결합하여 그래프 데이터의 시간적 의존성을 모델링합니다. 이 모델은 그래프 내 노드들 간의 연결과 그래프의 구조를 고려하여 시계열 데이터를 예측하고 분석하는데 유용합니다.

“GC-LSTM: 그래프 합성곱 임베딩 LSTM을 이용한 동적 링크 예측”이라는 논문은 동적인 그래프에서 링크 예측 작업에 그래프 합성곱 네트워크(GCN)와 Long Short-Term Memory(LSTM) 셀을 결합한 새로운 모델을 제안합니다.

논문에서는 그래프 구조가 시간에 따라 변화하는 동적인 그래프에서 노드들 사이의 링크 존재 여부를 예측하는 문제를 다룹니다. 기존의 링크 예측 방법들은 동적인 그래프의 변화를 처리하는데 어려움이 있습니다.

제안하는 GC-LSTM 모델은 그래프 합성곱을 사용하여 노드의 특징을 임베딩하고 그래프 구조를 파악합니다. 동시에 LSTM 셀을 활용하여 시간적 의존성과 순차적 패턴을 모델링합니다.

GC-LSTM 모델은 동적인 그래프 데이터를 시간 순서대로 처리하여 변화하는 그래프 구조를 적절히 반영하고 미래의 링크를 정확하게 예측할 수 있습니다. 실험과 평가를 통해 GC-LSTM 모델이 동적인 링크 예측 작업에서 다른 최신 기법들보다 우수한 성능을 보여주며, 동적인 그래프 구조를 다루는데 유용한 접근 방법임을 입증합니다.


Data 설명

# pd.read_csv('../Data/Body_Results.csv')
# pd.read_csv('../Data/chicken_inter_final.csv') # chickenpox cubic + nearest mrate 0.8 에서
# pd.read_csv('../Data/R_GNAR_results.csv') # GNAR을 R에서 돌린 결과 RANDOM, BLOCK
# pd.concat([pd.read_csv('../Data/DCRNN_50_windmillsmall.csv'), # 50% windmillsmall 결과들
#            pd.read_csv('../Data/GConvGRU_50_windmillsmall.csv'),
#            pd.read_csv('../Data/GConvLSTM_50_windmillsmall.csv'),
#            pd.read_csv('../Data/LRGCN_50_windmillsmall.csv'),
#            pd.read_csv('../Data/DyGrEncoder_50_windmillsmall.csv'),
#            pd.read_csv('../Data/TGCN_50_windmillsmall.csv'),
#            pd.read_csv('../Data/GCLSTM_50_windmillsmall.csv'),
#            pd.read_csv('../Data/EvolveGCNO_50_windmillsmall.csv'),
#            pd.read_csv('../Data/EvolveGCNH_50_windmillsmall.csv'),
#           ])
# pd.concat([pd.read_csv('../Data/DCRNN_80_windmillsmall.csv'), # 80% windmillsmall 결과들
#            pd.read_csv('../Data/LRGCN_80_windmillsmall.csv'),
#            pd.read_csv('../Data/DyGrEncoder_80_windmillsmall.csv'),
#            pd.read_csv('../Data/GConvLSTM_80_windmillsmall.csv'),
#            pd.read_csv('../Data/GConvGRU_80_windmillsmall.csv'),
#            pd.read_csv('../Data/TGCN_80_windmillsmall.csv'),
#            pd.read_csv('../Data/GCLSTM_80_windmillsmall.csv'),
#            pd.read_csv('../Data/EvolveGCNO_80_windmillsmall.csv'),
#            pd.read_csv('../Data/EvolveGCNH_80_windmillsmall.csv')
#           ])
# pd.concat([pd.read_csv('../Data/DCRNN_block_windmillsmall.csv'), # block windmillsmall 결과물
#           pd.read_csv('../Data/LRGCN_block_windmillsmall.csv'),
#           pd.read_csv('../Data/GConvGRU_block_windmillsmall.csv'),
#           pd.read_csv('../Data/EvolveGCNO_block_windmillsmall.csv'),
#           pd.read_csv('../Data/DyGrEncoder_block_windmillsmall.csv'),
#           pd.read_csv('../Data/GConvLSTM_block_windmillsmall.csv'),
#           pd.read_csv('../Data/GCLSTM_block_windmillsmall.csv'),
#           pd.read_csv('../Data/TGCN_block_windmillsmall.csv'),
#           pd.read_csv('../Data/EvolveGCNH_block_windmillsmall.csv')
#           ])
# pd.read_csv('../Data/pedalme_linear.csv') # pedalme linear random, block ##d body 결과에 추가함
# pd.read_csv('../Data/monte_linear.csv') # monte linear interpolation 결과

# import itstgcn
import torch
import pandas as pd

import numpy as np
import random
data_dict = itstgcn.load_data('./data/fivenodes.pkl')
loader = itstgcn.DatasetLoader(data_dict)
dataset = loader.get_dataset(lags=2)
sum_result = 0
for i in range(5):
    sum_result += np.sum(np.array(dataset.targets)[:,i])
print(sum_result)
-28.048902156588262
from torch_geometric_temporal.dataset import ChickenpoxDatasetLoader
loader1 = ChickenpoxDatasetLoader()
dataset1 = loader1.get_dataset(lags=4)
sum_result = 0
for i in range(20):
    sum_result += np.sum(np.array(dataset1.targets)[:,i])
print(sum_result)
9.553510148236436
from torch_geometric_temporal.dataset import PedalMeDatasetLoader
loader2 = PedalMeDatasetLoader()
dataset2 = loader2.get_dataset(lags=4)
sum_result = 0
for i in range(15):
    sum_result += np.sum(np.array(dataset2.targets)[:,i])
print(sum_result)
-39.06545396690812
from torch_geometric_temporal.dataset import WikiMathsDatasetLoader
loader3 = WikiMathsDatasetLoader()
dataset3 = loader3.get_dataset(lags=8)
sum_result = 0
for i in range(1068):
    sum_result += np.sum(np.array(dataset3.targets)[:,i])
print(sum_result)
-1543.6160620151331
loader6 = itstgcn.load_data('./data/Windmillsmall.pkl')
dataset6 = loader6.get_dataset(lags=8)
sum_result = 0
for i in range(11):
    sum_result += np.sum(np.array(dataset6.targets)[:,i])
print(sum_result)
0.33864788949161806
from torch_geometric_temporal.dataset import MontevideoBusDatasetLoader
loader10 = MontevideoBusDatasetLoader()
dataset10 = loader10.get_dataset(lags=8)
sum_result = 0
for i in range(675):
    sum_result += np.sum(np.array(dataset10.targets)[:,i])
print(sum_result)
1114.5722422676997

Import

import pandas as pd
import matplotlib.pyplot as plt
  • GConvGRU
# df_GConvGRU = pd.read_csv('../Data/simulation_results/Real_simulation_reshape/Final_Simulation_GConvGRU.csv')
# pedal_wiki_GSO_GConvGRU = pd.read_csv('../Data/simulation_results/Real_simulation_reshape/Final_Simulation_GConvGRU_pedal_wiki_GSO.csv')

df_GConvGRU = pd.read_csv('../Data/Final_Simulation_GConvGRU.csv')
pedal_wiki_GSO_GConvGRU = pd.read_csv('../Data//Final_Simulation_GConvGRU_pedal_wiki_GSO.csv')
df_GConvGRU['model']='GConvGRU'
pedal_wiki_GSO_GConvGRU['model']='GConvGRU'
df_GConvGRU['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • GConvLSTM
# df_GConvLSTM = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_GConvLSTM.csv')
# pedal_wiki_GSO_GConvLSTM = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_GConvLSTM_pedal_wiki_GSO.csv')

df_GConvLSTM = pd.read_csv('../Data/Final_Simulation_GConvLSTM.csv')
pedal_wiki_GSO_GConvLSTM = pd.read_csv('../Data/Final_Simulation_GConvLSTM_pedal_wiki_GSO.csv')
df_GConvLSTM['model']='GConvLSTM'
pedal_wiki_GSO_GConvLSTM['model']='GConvLSTM'
df_GConvLSTM['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • GCLSTM
# df_GCLSTM = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_GCLSTM.csv')
# pedal_wiki_GSO_GCLSTM = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_GCLSTM_pedal_wiki_GSO.csv')

df_GCLSTM = pd.read_csv('../Data/Final_Simulation_GCLSTM.csv')
pedal_wiki_GSO_GCLSTM = pd.read_csv('../Data/Final_Simulation_GCLSTM_pedal_wiki_GSO.csv')
df_GCLSTM['model']='GCLSTM'
pedal_wiki_GSO_GCLSTM['model']='GCLSTM'
df_GCLSTM['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • DCRNN
# df_DCRNN = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_DCRNN.csv')
# pedal_wiki_GSO_DCRNN = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_DCRNN_pedal_wiki_GSO.csv')

df_DCRNN = pd.read_csv('../Data//Final_Simulation_DCRNN.csv')
pedal_wiki_GSO_DCRNN = pd.read_csv('../Data/Final_Simulation_DCRNN_pedal_wiki_GSO.csv')
df_DCRNN['model']='DCRNN'
pedal_wiki_GSO_DCRNN['model']='DCRNN'
df_DCRNN['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • LRGCN
# df_LRGCN = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_LRGCN.csv')
# pedal_wiki_GSO_LRGCN = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_LRGCN_pedal_wiki_GSO.csv')

df_LRGCN = pd.read_csv('../Data/Final_Simulation_LRGCN.csv')
pedal_wiki_GSO_LRGCN = pd.read_csv('../Data/Final_Simulation_LRGCN_pedal_wiki_GSO.csv')
df_LRGCN['model']='LRGCN'
pedal_wiki_GSO_LRGCN['model']='LRGCN'
df_LRGCN['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • TGCN
# df_TGCN = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_TGCN.csv')
# pedal_wiki_GSO_TGCN = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_TGCN_pedal_wiki_GSO.csv')

df_TGCN = pd.read_csv('../Data/Final_Simulation_TGCN.csv')
pedal_wiki_GSO_TGCN = pd.read_csv('../Data/Final_Simulation_TGCN_pedal_wiki_GSO.csv')
df_TGCN['model']='TGCN'
pedal_wiki_GSO_TGCN['model']='TGCN'
df_TGCN['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • EvolveGCNO
# df_EvolveGCNO = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_EvolveGCNO.csv')
# pedal_wiki_GSO_EvolveGCNO = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_EvolveGCNO_pedal_wiki_GSO.csv')

df_EvolveGCNO = pd.read_csv('../Data/Final_Simulation_EvolveGCNO.csv')
pedal_wiki_GSO_EvolveGCNO = pd.read_csv('../Data/Final_Simulation_EvolveGCNO_pedal_wiki_GSO.csv')
df_EvolveGCNO['model']='EvolveGCNO'
pedal_wiki_GSO_EvolveGCNO['model']='EvolveGCNO'
df_EvolveGCNO['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • DYGRENCODER
# df_DYGRENCODER = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_DYGRENCODER.csv')
# pedal_wiki_GSO_DYGRENCODER = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_DYGRENCODER_pedal_wiki_GSO.csv')

df_DYGRENCODER = pd.read_csv('../Data/Final_Simulation_DYGRENCODER.csv')
pedal_wiki_GSO_DYGRENCODER = pd.read_csv('../Data/Final_Simulation_DYGRENCODER_pedal_wiki_GSO.csv')
df_DYGRENCODER['model']='DyGrEncoder'
pedal_wiki_GSO_DYGRENCODER['model']='DyGrEncoder'
df_DYGRENCODER['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • EvolveGCNH
# df_EvolveGCNH = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_EvolveGCNH.csv')
# pedal_wiki_GSO_EvolveGCNH = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_EvolveGCNH_pedal_wiki_GSO.csv')

df_EvolveGCNH = pd.read_csv('../Data/Final_Simulation_EvolveGCNH.csv')
pedal_wiki_GSO_EvolveGCNH = pd.read_csv('../Data/Final_Simulation_EvolveGCNH_pedal_wiki_GSO.csv')
df_EvolveGCNH['model']='EvolveGCNH'
pedal_wiki_GSO_EvolveGCNH['model']='EvolveGCNH'
df_EvolveGCNH['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'windmillsmall',
       'monte'], dtype=object)
  • GNAR
# df_GNAR = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_GNAR.csv')
# wiki_GSO_GNAR = pd.read_csv('./simulation_results/Real_simulation_reshape/Final_Simulation_GNAR_wiki_GSO.csv')

df_GNAR = pd.read_csv('../Data/Final_Simulation_GNAR.csv')
wiki_GSO_GNAR = pd.read_csv('../Data/Final_Simulation_GNAR_wiki_GSO.csv')
df_GNAR['model']='GNAR'
wiki_GSO_GNAR['model']='GNAR'
df_GNAR['dataset'].unique()
array(['fivenodes', 'chickenpox', 'pedalme', 'wikimath', 'monte',
       'windmillsmall'], dtype=object)
  • all
df = pd.concat([df_GConvGRU, df_GConvLSTM, df_GCLSTM, df_DCRNN, df_LRGCN, df_TGCN, df_EvolveGCNO, df_DYGRENCODER, df_EvolveGCNH,df_GNAR]).reset_index().iloc[:,1:]
df
dataset method mrate mtype lags nof_filters inter_method epoch mse calculation_time model
0 fivenodes STGCN 0.0 NaN 2 12.0 NaN 50.0 0.729374 80.985221 GConvGRU
1 fivenodes STGCN 0.0 NaN 2 12.0 NaN 50.0 0.729082 80.891788 GConvGRU
2 fivenodes STGCN 0.7 rand 2 12.0 linear 50.0 1.892262 81.976547 GConvGRU
3 fivenodes STGCN 0.7 rand 2 12.0 nearest 50.0 2.211288 87.803869 GConvGRU
4 fivenodes STGCN 0.8 rand 2 12.0 linear 50.0 2.072818 103.648742 GConvGRU
... ... ... ... ... ... ... ... ... ... ... ...
26786 pedalme GNAR 0.8 rand 4 NaN nearest NaN 1.302679 0.023105 GNAR
26787 pedalme GNAR 0.5 rand 4 NaN linear NaN 1.302679 0.022839 GNAR
26788 pedalme GNAR 0.5 rand 4 NaN nearest NaN 1.302679 0.023041 GNAR
26789 pedalme GNAR 0.8 rand 4 NaN linear NaN 1.302679 0.060872 GNAR
26790 pedalme GNAR 0.8 rand 4 NaN nearest NaN 1.302679 0.023526 GNAR

26791 rows × 11 columns

# df.to_csv('./df_fig.csv')
df2 = pd.concat([pedal_wiki_GSO_GConvGRU,pedal_wiki_GSO_GConvLSTM,pedal_wiki_GSO_GCLSTM,pedal_wiki_GSO_DCRNN,pedal_wiki_GSO_LRGCN,pedal_wiki_GSO_TGCN,pedal_wiki_GSO_EvolveGCNO,pedal_wiki_GSO_DYGRENCODER,pedal_wiki_GSO_EvolveGCNH,wiki_GSO_GNAR])
df2_out = pd.concat([df2.query("dataset == 'pedalme' and mtype=='rand' and lags==4 and mrate==0.6 and inter_method=='nearest'"),
    df2.query("dataset=='wikimath' and lags==8 and inter_method=='linear'")])
# df2_out.to_csv('./Appendix_Results.csv')
df_out = pd.concat([fivenode_final,Chickenpox_final,PedalMe_final,WikiMath_final,Windmillsmall_final,Montevideobus_final])
# df_out.to_csv('../Data/Body_Results.csv',index=False)

fivenode

fivenode_base = df.query("dataset=='fivenodes' and mtype!='rand' and mtype!='block' and method!='GNAR'")
fivenode_random = pd.concat([df.query("dataset=='fivenodes'  and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='GConvGRU' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='GConvLSTM' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==4 and lags==2 and epoch==50 and model=='GCLSTM' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==4 and lags==2 and epoch==50 and model=='LRGCN' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='DyGrEncoder' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and lags==2 and epoch==50 and model=='EvolveGCNH' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and lags==2 and epoch==50 and model=='EvolveGCNO' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='TGCN' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==2 and lags==2 and epoch==50 and model=='DCRNN' and mrate in [0.3  , 0.5  , 0.6 ,0.7  , 0.8]")])
fivenode_block = pd.concat([df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='GConvGRU'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='GConvLSTM'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==4 and lags==2 and epoch==50 and model=='GCLSTM'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==4 and lags==2 and epoch==50 and model=='LRGCN'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='DyGrEncoder'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and lags==2 and epoch==50 and model=='EvolveGCNH'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and lags==2 and epoch==50 and model=='EvolveGCNO'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==2 and epoch==50 and model=='TGCN'"),
                            df.query("dataset=='fivenodes' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==2 and lags==2 and epoch==50 and model=='DCRNN'")])
# fivenode_GNAR = df.query("dataset=='fivenodes' and method=='GNAR' and inter_method=='linear' and lags==2")
fivenode_final = pd.concat([fivenode_base,fivenode_random,fivenode_block])
# nearest_fivenodes = pd.concat([df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block'] and nof_filters==12 and lags==2 and epoch==50 and model=='GConvGRU'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block'] and nof_filters==12 and lags==2 and epoch==50 and model=='GConvLSTM'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block'] and nof_filters==4 and lags==2 and epoch==50 and model=='GCLSTM'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block'] and nof_filters==4 and lags==2 and epoch==50 and model=='LRGCN'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block'] and nof_filters==12 and lags==2 and epoch==50 and model=='DyGrEncoder'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block']  and lags==2 and epoch==50 and model=='EvolveGCNH'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block']  and lags==2 and epoch==50 and model=='EvolveGCNO'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block']  and nof_filters==12 and lags==2 and epoch==50 and model=='TGCN'"),
#                             df.query("dataset=='fivenodes' and method!='GNAR' and mtype in ['rand','block']  and nof_filters==2 and lags==2 and epoch==50 and model=='DCRNN'")])
# nearest_fivenodes.to_csv('../Data/Add/nearest_fivenodes.csv',index=False)

Baseline

pd.merge(df.query("dataset=='fivenodes' and mtype!='rand' and mtype!='block' and method !='GNAR'").groupby(['model','nof_filters','lags','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='fivenodes' and mtype!='rand' and mtype!='block' and method !='GNAR'").groupby(['model','nof_filters','lags','epoch'])['mse'].std().reset_index(),
         on=['model','nof_filters','lags','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model nof_filters lags epoch mean std
0 DCRNN 2.0 2 50.0 1.229 0.041
1 DyGrEncoder 12.0 2 50.0 1.114 0.037
2 EvolveGCNH 12.0 2 50.0 1.175 0.068
3 EvolveGCNO 12.0 2 50.0 1.168 0.065
4 GCLSTM 4.0 2 50.0 1.209 0.023
5 GConvGRU 12.0 2 50.0 0.732 0.005
6 GConvLSTM 12.0 2 50.0 1.131 0.041
7 LRGCN 4.0 2 50.0 1.212 0.024
8 TGCN 12.0 2 50.0 1.085 0.016

Random

pd.merge(df.query("dataset=='fivenodes' and mtype=='rand'").groupby(['model','mrate','nof_filters','inter_method','method','lags','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='fivenodes' and mtype=='rand'").groupby(['model','mrate','nof_filters','inter_method','method','lags','epoch'])['mse'].std().reset_index(),
         on=['model','inter_method','method','nof_filters','mrate','lags','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3).query("mrate==0.7 and inter_method=='linear'")
model mrate nof_filters inter_method method lags epoch mean std
12 DCRNN 0.7 2.0 linear IT-STGCN 2 50.0 1.247 0.044
13 DCRNN 0.7 2.0 linear STGCN 2 50.0 1.271 0.066
32 DyGrEncoder 0.7 12.0 linear IT-STGCN 2 50.0 1.252 0.060
33 DyGrEncoder 0.7 12.0 linear STGCN 2 50.0 1.548 0.158
52 EvolveGCNH 0.7 12.0 linear IT-STGCN 2 50.0 1.188 0.049
53 EvolveGCNH 0.7 12.0 linear STGCN 2 50.0 1.228 0.064
72 EvolveGCNO 0.7 12.0 linear IT-STGCN 2 50.0 1.162 0.052
73 EvolveGCNO 0.7 12.0 linear STGCN 2 50.0 1.198 0.045
92 GCLSTM 0.7 4.0 linear IT-STGCN 2 50.0 1.228 0.034
93 GCLSTM 0.7 4.0 linear STGCN 2 50.0 1.245 0.033
112 GConvGRU 0.7 12.0 linear IT-STGCN 2 50.0 1.180 0.060
113 GConvGRU 0.7 12.0 linear STGCN 2 50.0 1.858 0.139
132 GConvLSTM 0.7 12.0 linear IT-STGCN 2 50.0 1.287 0.075
133 GConvLSTM 0.7 12.0 linear STGCN 2 50.0 1.472 0.125
152 LRGCN 0.7 4.0 linear IT-STGCN 2 50.0 1.244 0.041
153 LRGCN 0.7 4.0 linear STGCN 2 50.0 1.261 0.047
172 TGCN 0.7 12.0 linear IT-STGCN 2 50.0 1.110 0.037
173 TGCN 0.7 12.0 linear STGCN 2 50.0 1.184 0.057

Block

pd.merge(df.query("dataset=='fivenodes' and mtype=='block' and inter_method=='linear'").groupby(['model','mrate','nof_filters','inter_method','method','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='fivenodes' and mtype=='block' and inter_method=='linear'").groupby(['model','mrate','nof_filters','inter_method','method','epoch'])['mse'].std().reset_index(),
         on=['model','inter_method','method','nof_filters','mrate','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate nof_filters inter_method method epoch mean std
0 DCRNN 0.125 2.0 linear IT-STGCN 50.0 1.232 0.033
1 DCRNN 0.125 2.0 linear STGCN 50.0 1.260 0.051
2 DyGrEncoder 0.125 12.0 linear IT-STGCN 50.0 1.124 0.035
3 DyGrEncoder 0.125 12.0 linear STGCN 50.0 1.173 0.037
4 EvolveGCNH 0.125 12.0 linear IT-STGCN 50.0 1.181 0.055
5 EvolveGCNH 0.125 12.0 linear STGCN 50.0 1.197 0.076
6 EvolveGCNO 0.125 12.0 linear IT-STGCN 50.0 1.162 0.040
7 EvolveGCNO 0.125 12.0 linear STGCN 50.0 1.176 0.056
8 GCLSTM 0.125 4.0 linear IT-STGCN 50.0 1.219 0.025
9 GCLSTM 0.125 4.0 linear STGCN 50.0 1.244 0.033
10 GConvGRU 0.125 12.0 linear IT-STGCN 50.0 1.165 0.043
11 GConvGRU 0.125 12.0 linear STGCN 50.0 1.210 0.039
12 GConvLSTM 0.125 12.0 linear IT-STGCN 50.0 1.140 0.038
13 GConvLSTM 0.125 12.0 linear STGCN 50.0 1.172 0.055
14 LRGCN 0.125 4.0 linear IT-STGCN 50.0 1.220 0.020
15 LRGCN 0.125 4.0 linear STGCN 50.0 1.251 0.037
16 TGCN 0.125 12.0 linear IT-STGCN 50.0 1.090 0.015
17 TGCN 0.125 12.0 linear STGCN 50.0 1.107 0.020

ChickenpoxDatasetLoader(lags=4)

Chickenpox_base = df.query("dataset=='chickenpox' and mtype!='rand' and mtype!='block' and method !='GNAR' and lags==4")
Chickenpox_random = pd.concat([df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==16 and lags==4 and epoch==50 and model=='GConvGRU' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==32 and lags==4 and epoch==50 and model=='GConvLSTM' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==16 and lags==4 and epoch==50 and model=='GCLSTM' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==8 and lags==4 and epoch==50 and model=='LRGCN' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and lags==4 and epoch==50 and model=='EvolveGCNH' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and lags==4 and epoch==50 and model=='EvolveGCNO' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==4 and epoch==50 and model=='TGCN' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==16 and lags==4 and epoch==50 and model=='DCRNN' and mrate in [ 0.3   , 0.5   ,   0.6  , 0.8 ]")])
Chickenpox_block = pd.concat([df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==16 and lags==4 and epoch==50 and model=='GConvGRU'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==32 and lags==4 and epoch==50 and model=='GConvLSTM'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==16 and lags==4 and epoch==50 and model=='GCLSTM'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==8 and lags==4 and epoch==50 and model=='LRGCN'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and lags==4 and epoch==50 and model=='EvolveGCNH'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and lags==4 and epoch==50 and model=='EvolveGCNO'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==4 and epoch==50 and model=='TGCN'"),
                                df.query("dataset=='chickenpox' and method!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==16 and lags==4 and epoch==50 and model=='DCRNN'")])
# Chickenpox_GNAR = df.query("model=='GNAR' and dataset=='chickenpox' and inter_method=='linear' and lags==4")
Chickenpox_final = pd.concat([Chickenpox_base,Chickenpox_random,Chickenpox_block])

Baseline

pd.merge(df.query("dataset=='chickenpox' and mtype!='rand' and mtype!='block' and method !='GNAR' and lags==4").groupby(['model','nof_filters','lags','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='chickenpox' and mtype!='rand' and mtype!='block' and method !='GNAR'").groupby(['model','nof_filters','lags','epoch'])['mse'].std().reset_index(),
         on=['model','nof_filters','lags','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model nof_filters lags epoch mean std
0 DCRNN 16.0 4 50.0 0.727 0.009
1 DyGrEncoder 12.0 4 50.0 0.906 0.051
2 EvolveGCNH 32.0 4 50.0 1.000 0.020
3 EvolveGCNO 32.0 4 50.0 0.986 0.018
4 GCLSTM 16.0 4 50.0 0.885 0.051
5 GConvGRU 16.0 4 50.0 0.752 0.013
6 GConvLSTM 32.0 4 50.0 0.959 0.088
7 LRGCN 8.0 4 50.0 0.868 0.047
8 TGCN 12.0 4 50.0 1.090 0.042

Random

pd.merge(df.query("dataset=='chickenpox' and mtype=='rand' and mrate==0.8").groupby(['model','mrate','inter_method','nof_filters','method'])['mse'].mean().reset_index(),
         df.query("dataset=='chickenpox' and mtype=='rand' and mrate==0.8").groupby(['model','mrate','inter_method','nof_filters','method'])['mse'].std().reset_index(),
         on=['model','method','inter_method','mrate','nof_filters']).rename(columns={'mse_x':'mean','mse_y':'std'})
model mrate inter_method nof_filters method mean std
0 DCRNN 0.8 linear 16.0 IT-STGCN 1.467027 0.075759
1 DCRNN 0.8 linear 16.0 STGCN 2.287427 0.073821
2 DyGrEncoder 0.8 linear 12.0 IT-STGCN 1.398729 0.063095
3 DyGrEncoder 0.8 linear 12.0 STGCN 2.126992 0.240039
4 EvolveGCNH 0.8 linear 32.0 IT-STGCN 1.140095 0.041585
5 EvolveGCNH 0.8 linear 32.0 STGCN 1.202927 0.060884
6 EvolveGCNO 0.8 linear 32.0 IT-STGCN 1.161391 0.053718
7 EvolveGCNO 0.8 linear 32.0 STGCN 1.233670 0.095648
8 GCLSTM 0.8 linear 16.0 IT-STGCN 1.370550 0.072418
9 GCLSTM 0.8 linear 16.0 STGCN 2.172284 0.185516
10 GConvGRU 0.8 linear 16.0 IT-STGCN 1.585524 0.199285
11 GConvGRU 0.8 linear 16.0 STGCN 2.528949 0.292085
12 GConvLSTM 0.8 linear 32.0 IT-STGCN 1.432865 0.080189
13 GConvLSTM 0.8 linear 32.0 STGCN 2.521938 0.111349
14 LRGCN 0.8 linear 8.0 IT-STGCN 1.333524 0.071124
15 LRGCN 0.8 linear 8.0 STGCN 1.632052 0.156044
16 TGCN 0.8 linear 12.0 IT-STGCN 1.183393 0.027691
17 TGCN 0.8 linear 12.0 STGCN 1.465696 0.064056

Block

pd.merge(df.query("dataset=='chickenpox' and mtype=='block' and inter_method=='linear'").groupby(['model','inter_method','mrate','nof_filters','method'])['mse'].mean().reset_index(),
         df.query("dataset=='chickenpox' and mtype=='block' and inter_method=='linear'").groupby(['model','inter_method','mrate','nof_filters','method'])['mse'].std().reset_index(),
         on=['model','method','inter_method','mrate','nof_filters']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model inter_method mrate nof_filters method mean std
0 DCRNN linear 0.288 16.0 IT-STGCN 0.740 0.007
1 DCRNN linear 0.288 16.0 STGCN 0.812 0.006
2 DyGrEncoder linear 0.288 12.0 IT-STGCN 0.899 0.035
3 DyGrEncoder linear 0.288 12.0 STGCN 0.912 0.043
4 EvolveGCNH linear 0.288 32.0 IT-STGCN 1.007 0.021
5 EvolveGCNH linear 0.288 32.0 STGCN 1.027 0.023
6 EvolveGCNO linear 0.288 32.0 IT-STGCN 1.002 0.015
7 EvolveGCNO linear 0.288 32.0 STGCN 1.028 0.016
8 GCLSTM linear 0.288 16.0 IT-STGCN 0.883 0.045
9 GCLSTM linear 0.288 16.0 STGCN 0.890 0.033
10 GConvGRU linear 0.288 16.0 IT-STGCN 0.807 0.016
11 GConvGRU linear 0.288 16.0 STGCN 0.828 0.022
12 GConvLSTM linear 0.288 32.0 IT-STGCN 0.911 0.069
13 GConvLSTM linear 0.288 32.0 STGCN 0.900 0.049
14 LRGCN linear 0.288 8.0 IT-STGCN 0.888 0.035
15 LRGCN linear 0.288 8.0 STGCN 0.911 0.047
16 TGCN linear 0.288 12.0 IT-STGCN 1.065 0.031
17 TGCN linear 0.288 12.0 STGCN 1.082 0.028

PedalMeDatasetLoader (lags=4)

pedal_real = pd.read_csv('../Data/pedalme_linear.csv') # pedalme linear random, block
PedalMe_base = df.query("dataset=='pedalme' and mtype!='rand' and mtype!='block' and method!='GNAR' and lags==4 and inter_method!='linear'")
# PedalMe_random = pd.concat([pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GConvGRU' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==2 and lags==4 and epoch==50 and model=='GConvLSTM' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==4 and lags==4 and epoch==50 and model=='GCLSTM' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==8 and lags==4 and epoch==50 and model=='LRGCN' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNH' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNO' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='TGCN' and mrate in [0.3,0.5,0.6,0.8]"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==8 and lags==4 and epoch==50 and model=='DCRNN' and mrate in [0.3,0.5,0.6,0.8]")])
# PedalMe_block = pd.concat([pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GConvGRU'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==2 and lags==4 and epoch==50 and model=='GConvLSTM'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==4 and lags==4 and epoch==50 and model=='GCLSTM'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==8 and lags==4 and epoch==50 and model=='LRGCN'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNH'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNO'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='TGCN'"),
#                             pedal_real.query("dataset=='pedalme' and method!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==8 and lags==4 and epoch==50 and model=='DCRNN'")])
# PedalMe_GNAR = pedal_real.query("model=='GNAR' and dataset=='pedalme' and lags==4")
# PedalMe_final = pd.concat([PedalMe_base,PedalMe_random,PedalMe_block,PedalMe_GNAR])
PedalMe_final = pd.concat([PedalMe_base,pedal_real])
# nearest_pedalme = pd.concat([df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==12 and lags==4 and epoch==50 and model=='GConvGRU'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==2 and lags==4 and epoch==50 and model=='GConvLSTM'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==4 and lags==4 and epoch==50 and model=='GCLSTM'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==8 and lags==4 and epoch==50 and model=='LRGCN'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and lags==4 and epoch==50 and model=='EvolveGCNH'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and lags==4 and epoch==50 and model=='EvolveGCNO'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==12 and lags==4 and epoch==50 and model=='TGCN'"),
#                             df.query("dataset=='pedalme' and method!='GNAR' and mtype in ['block','rand'] and nof_filters==8 and lags==4 and epoch==50 and model=='DCRNN'")])
# nearest_pedalme.to_csv('../Data/Add/nearest_pedalme.csv',index=False)

Baseline

pd.merge(df.query("dataset=='pedalme' and mtype!='rand' and mtype!='block'").groupby(['model','lags','nof_filters','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='pedalme' and mtype!='rand' and mtype!='block'").groupby(['model','lags','nof_filters','epoch'])['mse'].std().reset_index(),
         on=['model','lags','nof_filters','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3).query("lags==4")
model lags nof_filters epoch mean std
0 DCRNN 4 8.0 50.0 1.131 0.015
1 DyGrEncoder 4 12.0 50.0 1.190 0.047
2 EvolveGCNH 4 2.0 50.0 1.213 0.057
3 EvolveGCNO 4 2.0 50.0 1.223 0.051
4 GCLSTM 4 4.0 50.0 1.181 0.040
5 GConvGRU 4 12.0 50.0 1.233 0.107
6 GConvLSTM 4 2.0 50.0 1.214 0.055
7 LRGCN 4 8.0 50.0 1.191 0.054
8 TGCN 4 12.0 50.0 1.307 0.075

Random

pd.merge(df.query("dataset=='pedalme' and mtype=='rand' and inter_method=='nearest'").groupby(['model','mrate','lags','nof_filters','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='pedalme' and mtype=='rand' and inter_method=='nearest'").groupby(['model','mrate','lags','nof_filters','inter_method','method'])['mse'].std().reset_index(),
         on=['model','method','nof_filters','mrate','lags','inter_method']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3).query("mrate == 0.6")
model mrate lags nof_filters inter_method method mean std
4 DCRNN 0.6 4 8.0 nearest IT-STGCN 1.303 0.078
5 DCRNN 0.6 4 8.0 nearest STGCN 1.509 0.068
12 DyGrEncoder 0.6 4 12.0 nearest IT-STGCN 1.285 0.051
13 DyGrEncoder 0.6 4 12.0 nearest STGCN 1.513 0.083
20 EvolveGCNH 0.6 4 2.0 nearest IT-STGCN 1.262 0.091
21 EvolveGCNH 0.6 4 2.0 nearest STGCN 1.284 0.066
28 EvolveGCNO 0.6 4 2.0 nearest IT-STGCN 1.267 0.067
29 EvolveGCNO 0.6 4 2.0 nearest STGCN 1.292 0.075
36 GCLSTM 0.6 4 4.0 nearest IT-STGCN 1.259 0.042
37 GCLSTM 0.6 4 4.0 nearest STGCN 1.365 0.064
44 GConvGRU 0.6 4 12.0 nearest IT-STGCN 1.625 0.324
45 GConvGRU 0.6 4 12.0 nearest STGCN 1.851 0.254
52 GConvLSTM 0.6 4 2.0 nearest IT-STGCN 1.248 0.045
53 GConvLSTM 0.6 4 2.0 nearest STGCN 1.274 0.078
60 LRGCN 0.6 4 8.0 nearest IT-STGCN 1.286 0.033
61 LRGCN 0.6 4 8.0 nearest STGCN 1.462 0.084
68 TGCN 0.6 4 12.0 nearest IT-STGCN 1.260 0.072
69 TGCN 0.6 4 12.0 nearest STGCN 1.301 0.090

Block

pd.merge(df.query("dataset=='pedalme' and mtype=='block' and inter_method=='nearest' and lags==4").groupby(['model','mrate','lags','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='pedalme' and mtype=='block' and inter_method=='nearest' and lags==4").groupby(['model','mrate','lags','inter_method','method'])['mse'].std().reset_index(),
         on=['model','method','mrate','lags','inter_method']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate lags inter_method method mean std
0 DCRNN 0.286 4 nearest IT-STGCN 1.150 0.014
1 DCRNN 0.286 4 nearest STGCN 1.304 0.021
2 DyGrEncoder 0.286 4 nearest IT-STGCN 1.165 0.032
3 DyGrEncoder 0.286 4 nearest STGCN 1.269 0.066
4 EvolveGCNH 0.286 4 nearest IT-STGCN 1.222 0.040
5 EvolveGCNH 0.286 4 nearest STGCN 1.265 0.072
6 EvolveGCNO 0.286 4 nearest IT-STGCN 1.245 0.045
7 EvolveGCNO 0.286 4 nearest STGCN 1.246 0.035
8 GCLSTM 0.286 4 nearest IT-STGCN 1.195 0.029
9 GCLSTM 0.286 4 nearest STGCN 1.248 0.019
10 GConvGRU 0.286 4 nearest IT-STGCN 1.289 0.115
11 GConvGRU 0.286 4 nearest STGCN 1.270 0.114
12 GConvLSTM 0.286 4 nearest IT-STGCN 1.222 0.039
13 GConvLSTM 0.286 4 nearest STGCN 1.237 0.046
14 GNAR 0.286 4 nearest GNAR 1.303 0.000
15 LRGCN 0.286 4 nearest IT-STGCN 1.165 0.035
16 LRGCN 0.286 4 nearest STGCN 1.263 0.033
17 TGCN 0.286 4 nearest IT-STGCN 1.262 0.066
18 TGCN 0.286 4 nearest STGCN 1.232 0.069

W_st

pd.merge(df2.query("dataset == 'pedalme' and mtype=='rand' and lags==4 and mrate==0.6 and inter_method=='nearest'").groupby(['model','mrate','lags','inter_method','method','epoch'])['mse'].mean().reset_index(),
         df2.query("dataset == 'pedalme' and mtype=='rand' and lags==4 and mrate==0.6 and inter_method=='nearest'").groupby(['model','mrate','lags','inter_method','method','epoch'])['mse'].std().reset_index(),
         on=['model','method','mrate','lags','inter_method','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3).query("method !='STGCN' and lags==4 and mrate == 0.6 and inter_method=='nearest'")
model mrate lags inter_method method epoch mean std
0 DCRNN 0.6 4 nearest IT-STGCN 50.0 1.208 0.079
2 DyGrEncoder 0.6 4 nearest IT-STGCN 50.0 1.305 0.131
4 EvolveGCNH 0.6 4 nearest IT-STGCN 50.0 1.246 0.067
6 EvolveGCNO 0.6 4 nearest IT-STGCN 50.0 1.248 0.072
8 GCLSTM 0.6 4 nearest IT-STGCN 50.0 1.231 0.044
10 GConvGRU 0.6 4 nearest IT-STGCN 50.0 1.410 0.208
12 GConvLSTM 0.6 4 nearest IT-STGCN 50.0 1.313 0.205
14 LRGCN 0.6 4 nearest IT-STGCN 50.0 1.331 0.120
16 TGCN 0.6 4 nearest IT-STGCN 50.0 1.338 0.202

WikiMathsDatasetLoader (lags=8)

WikiMath_base = df.query("dataset=='wikimath' and mtype not in ['random','block'] and lags==8 and method !='GNAR'")
WikiMath_random = pd.concat([df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='GConvGRU' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==64 and lags==8 and epoch==50 and model=='GConvLSTM' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==64 and lags==8 and epoch==50 and model=='GCLSTM' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==32 and lags==8 and epoch==50 and model=='LRGCN' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='DyGrEncoder' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and lags==8 and epoch==50 and model=='EvolveGCNH' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and lags==8 and epoch==50 and model=='EvolveGCNO' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='TGCN' and mrate in [0.3, 0.5, 0.6, 0.8]"),
                            df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='DCRNN' and mrate in [0.3, 0.5, 0.6, 0.8]")])
# WikiMath_block = pd.concat([df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='GConvGRU'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==64 and lags==8 and epoch==50 and model=='GConvLSTM'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==64 and lags==8 and epoch==50 and model=='GCLSTM'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==32 and lags==8 and epoch==50 and model=='LRGCN'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='DyGrEncoder'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and lags==8 and epoch==50 and model=='EvolveGCNH'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and lags==8 and epoch==50 and model=='EvolveGCNO'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='TGCN'"),
#                             df.query("dataset=='wikimath' and model!='GNAR' and mtype=='block' and inter_method == 'linear' and nof_filters==12 and lags==8 and epoch==50 and model=='DCRNN'")])
WikiMath_block = pd.read_csv('../Data/wikimath_block_2024.csv')
# WikiMath_GNAR = df.query("model=='GNAR' and dataset=='wikimath'")
WikiMath_final = pd.concat([WikiMath_base,WikiMath_random,WikiMath_block])

Baseline

pd.merge(df.query("dataset=='wikimath' and mrate not in ['random','block'] and lags==8 and method !='GNAR'").groupby(['model','lags','nof_filters','method','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='wikimath' and mrate not in ['random','block'] and lags==8 and method !='GNAR'").groupby(['model','lags','nof_filters','method','epoch'])['mse'].std().reset_index(),
         on=['model','lags','nof_filters','method','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model lags nof_filters method epoch mean std
0 DCRNN 8 12.0 IT-STGCN 50.0 0.601 0.033
1 DCRNN 8 12.0 STGCN 50.0 0.658 0.095
2 DyGrEncoder 8 12.0 IT-STGCN 50.0 0.573 0.029
3 DyGrEncoder 8 12.0 STGCN 50.0 0.616 0.082
4 EvolveGCNH 8 12.0 IT-STGCN 50.0 0.800 0.046
5 EvolveGCNH 8 12.0 STGCN 50.0 0.816 0.062
6 EvolveGCNO 8 12.0 IT-STGCN 50.0 0.746 0.027
7 EvolveGCNO 8 12.0 STGCN 50.0 0.768 0.052
8 GCLSTM 8 64.0 IT-STGCN 50.0 0.667 0.073
9 GCLSTM 8 64.0 STGCN 50.0 0.855 0.277
10 GConvGRU 8 12.0 IT-STGCN 50.0 0.549 0.055
11 GConvGRU 8 12.0 STGCN 50.0 0.632 0.139
12 GConvLSTM 8 64.0 IT-STGCN 50.0 0.701 0.112
13 GConvLSTM 8 64.0 STGCN 50.0 0.926 0.286
14 LRGCN 8 32.0 IT-STGCN 50.0 0.646 0.062
15 LRGCN 8 32.0 STGCN 50.0 0.797 0.186
16 TGCN 8 12.0 IT-STGCN 50.0 0.748 0.039
17 TGCN 8 12.0 STGCN 50.0 0.761 0.047

Random

pd.merge(df.query("dataset=='wikimath' and mtype=='rand' and inter_method=='linear' and method!='GNAR'").groupby(['model','mrate','lags','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='wikimath' and mtype=='rand' and inter_method=='linear' and method!='GNAR'").groupby(['model','mrate','lags','inter_method','method'])['mse'].std().reset_index(),
         on=['model','method','mrate','inter_method','lags']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3).query("mrate == 0.8")
model mrate lags inter_method method mean std
6 DCRNN 0.8 8 linear IT-STGCN 0.672 0.007
7 DCRNN 0.8 8 linear STGCN 0.846 0.031
14 DyGrEncoder 0.8 8 linear IT-STGCN 0.606 0.017
15 DyGrEncoder 0.8 8 linear STGCN 0.770 0.045
22 EvolveGCNH 0.8 8 linear IT-STGCN 0.877 0.045
23 EvolveGCNH 0.8 8 linear STGCN 0.915 0.063
30 EvolveGCNO 0.8 8 linear IT-STGCN 0.780 0.027
31 EvolveGCNO 0.8 8 linear STGCN 0.863 0.038
38 GCLSTM 0.8 8 linear IT-STGCN 0.815 0.058
39 GCLSTM 0.8 8 linear STGCN 1.407 0.117
46 GConvGRU 0.8 8 linear IT-STGCN 0.687 0.021
47 GConvGRU 0.8 8 linear STGCN 0.932 0.043
54 GConvLSTM 0.8 8 linear IT-STGCN 0.920 0.069
55 GConvLSTM 0.8 8 linear STGCN 1.423 0.121
62 LRGCN 0.8 8 linear IT-STGCN 0.769 0.045
63 LRGCN 0.8 8 linear STGCN 1.105 0.099
70 TGCN 0.8 8 linear IT-STGCN 0.771 0.020
71 TGCN 0.8 8 linear STGCN 0.827 0.030

Block

pd.merge(df.query("dataset=='wikimath' and mtype=='block'").groupby(['model','mrate','lags','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='wikimath' and mtype=='block'").groupby(['model','mrate','lags','inter_method','method'])['mse'].std().reset_index(),
         on=['model','method','mrate','inter_method','lags']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate lags inter_method method mean std
0 DCRNN 0.120 8 linear IT-STGCN 0.583 0.006
1 DCRNN 0.120 8 linear STGCN 0.578 0.005
2 DyGrEncoder 0.120 8 linear IT-STGCN 0.563 0.025
3 DyGrEncoder 0.120 8 linear STGCN 0.546 0.016
4 EvolveGCNH 0.120 8 linear IT-STGCN 0.776 0.028
5 EvolveGCNH 0.120 8 linear STGCN 0.773 0.021
6 EvolveGCNO 0.120 8 linear IT-STGCN 0.732 0.025
7 EvolveGCNO 0.120 8 linear STGCN 0.735 0.022
8 GCLSTM 0.120 8 linear IT-STGCN 0.640 0.019
9 GCLSTM 0.120 8 linear STGCN 0.638 0.013
10 GConvGRU 0.004 8 linear IT-STGCN 0.529 0.003
11 GConvGRU 0.004 8 linear STGCN 0.528 0.003
12 GConvGRU 0.096 8 linear IT-STGCN 0.529 0.004
13 GConvGRU 0.096 8 linear STGCN 0.544 0.011
14 GConvGRU 0.120 8 linear IT-STGCN 0.523 0.002
15 GConvGRU 0.120 8 linear STGCN 0.531 0.002
16 GConvLSTM 0.120 8 linear IT-STGCN 0.627 0.014
17 GConvLSTM 0.120 8 linear STGCN 0.660 0.034
18 GNAR 0.120 8 linear GNAR 1.354 0.000
19 LRGCN 0.120 8 linear IT-STGCN 0.608 0.012
20 LRGCN 0.120 8 linear STGCN 0.624 0.024
21 TGCN 0.120 8 linear IT-STGCN 0.748 0.046
22 TGCN 0.120 8 linear STGCN 0.741 0.046

missing values on the same nodes

pd.merge(df2.query("dataset=='wikimath' and lags==8 and inter_method=='linear'").groupby(['model','mrate','lags','method','epoch'])['mse'].mean().reset_index(),
        df2.query("dataset=='wikimath' and lags==8 and inter_method=='linear'").groupby(['model','mrate','lags','method','epoch'])['mse'].std().reset_index(),
         on=['model','method','mrate','lags','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate lags method epoch mean std
0 DCRNN 0.512 8 IT-STGCN 50.0 0.592 0.005
1 DCRNN 0.512 8 STGCN 50.0 0.665 0.015
2 DyGrEncoder 0.512 8 IT-STGCN 50.0 0.561 0.031
3 DyGrEncoder 0.512 8 STGCN 50.0 0.626 0.027
4 EvolveGCNH 0.512 8 IT-STGCN 50.0 0.794 0.031
5 EvolveGCNH 0.512 8 STGCN 50.0 0.818 0.031
6 EvolveGCNO 0.512 8 IT-STGCN 50.0 0.745 0.017
7 EvolveGCNO 0.512 8 STGCN 50.0 0.753 0.026
8 GCLSTM 0.512 8 IT-STGCN 50.0 0.617 0.011
9 GCLSTM 0.512 8 STGCN 50.0 0.823 0.048
10 GConvGRU 0.512 8 IT-STGCN 50.0 0.533 0.003
11 GConvGRU 0.512 8 STGCN 50.0 0.726 0.015
12 GConvLSTM 0.512 8 IT-STGCN 50.0 0.653 0.033
13 GConvLSTM 0.512 8 STGCN 50.0 0.963 0.098
14 LRGCN 0.512 8 IT-STGCN 50.0 0.624 0.019
15 LRGCN 0.512 8 STGCN 50.0 0.810 0.064
16 TGCN 0.512 8 IT-STGCN 50.0 0.750 0.039
17 TGCN 0.512 8 STGCN 50.0 0.782 0.030

Windmillsmall(lags=8)

Windmillsmall_base = df.query("dataset=='windmillsmall' and mtype not in ['random','block'] and lags==8 and method !='GNAR'")
Windmillsmall_random = pd.concat([df.query("dataset=='windmillsmall' and mtype=='rand' and inter_method == 'linear' and lags==8 and epoch==50 and method !='GNAR' and inter_method=='linear'")])
# Windmillsmall_block = pd.concat([df.query("dataset=='windmillsmall' and mtype=='block' and inter_method == 'linear' and lags==8 and epoch==50 and method !='GNAR' and inter_method=='linear'")])
# Windmillsmall_GNAR = df.query("model=='GNAR' and dataset=='windmillsmall' and lags==8  and inter_method!='nearest' and method !='GNAR'")
Windmillsmall_final = pd.concat([Windmillsmall_base,Windmillsmall_random])

Baseline

pd.merge(df.query("dataset=='windmillsmall' and mrate not in ['random','block'] and lags==8 and method !='GNAR'").groupby(['model','lags','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='windmillsmall' and mrate not in ['random','block'] and lags==8 and method !='GNAR'").groupby(['model','lags','epoch'])['mse'].std().reset_index(),
         on=['model','lags','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model lags epoch mean std
0 DCRNN 8 50.0 1.069 0.136
1 DyGrEncoder 8 50.0 1.130 0.266
2 EvolveGCNH 8 50.0 1.068 0.141
3 EvolveGCNO 8 50.0 1.097 0.196
4 GCLSTM 8 50.0 1.110 0.220
5 GConvGRU 8 50.0 1.146 0.244
6 GConvLSTM 8 50.0 1.122 0.217
7 LRGCN 8 50.0 1.091 0.189
8 TGCN 8 50.0 1.058 0.116

Random

pd.merge(df.query("dataset=='windmillsmall' and mtype=='rand' and method !='GNAR'").groupby(['model','mrate','lags','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='windmillsmall' and mtype=='rand' and method !='GNAR'").groupby(['model','mrate','lags','inter_method','method'])['mse'].std().reset_index(),
         on=['model','method','mrate','inter_method','lags']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate lags inter_method method mean std
0 DCRNN 0.7 8 linear IT-STGCN 1.117 0.034
1 DCRNN 0.7 8 linear STGCN 1.348 0.057
2 DyGrEncoder 0.7 8 linear IT-STGCN 1.127 0.009
3 DyGrEncoder 0.7 8 linear STGCN 1.709 0.074
4 EvolveGCNH 0.7 8 linear IT-STGCN 1.129 0.035
5 EvolveGCNH 0.7 8 linear STGCN 1.330 0.137
6 EvolveGCNO 0.7 8 linear IT-STGCN 1.149 0.026
7 EvolveGCNO 0.7 8 linear STGCN 1.495 0.137
8 GCLSTM 0.7 8 linear IT-STGCN 1.116 0.021
9 GCLSTM 0.7 8 linear STGCN 1.573 0.105
10 GConvGRU 0.7 8 linear IT-STGCN 1.194 0.042
11 GConvGRU 0.7 8 linear STGCN 1.662 0.073
12 GConvLSTM 0.7 8 linear IT-STGCN 1.142 0.021
13 GConvLSTM 0.7 8 linear STGCN 1.599 0.057
14 LRGCN 0.7 8 linear IT-STGCN 1.110 0.012
15 LRGCN 0.7 8 linear STGCN 1.492 0.087
16 TGCN 0.7 8 linear IT-STGCN 1.071 0.010
17 TGCN 0.7 8 linear STGCN 1.305 0.039

Block

pd.merge(df.query("dataset=='windmillsmall' and mtype=='block' and method !='GNAR'").groupby(['model','mrate','nof_filters','lags','method'])['mse'].mean().reset_index(),
         df.query("dataset=='windmillsmall' and mtype=='block' and method !='GNAR'").groupby(['model','mrate','nof_filters','lags','method'])['mse'].std().reset_index(),
         on=['model','method','nof_filters','mrate','lags']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate nof_filters lags method mean std
0 DCRNN 0.081 4.0 8 IT-STGCN 0.983 0.002
1 DCRNN 0.081 4.0 8 STGCN 0.994 0.005
2 DyGrEncoder 0.081 12.0 8 IT-STGCN 0.985 0.005
3 DyGrEncoder 0.081 12.0 8 STGCN 0.985 0.003
4 EvolveGCNH 0.081 12.0 8 IT-STGCN 0.986 0.003
5 EvolveGCNH 0.081 12.0 8 STGCN 0.993 0.003
6 EvolveGCNO 0.081 12.0 8 IT-STGCN 0.983 0.002
7 EvolveGCNO 0.081 12.0 8 STGCN 0.990 0.002
8 GCLSTM 0.081 16.0 8 IT-STGCN 0.985 0.003
9 GCLSTM 0.081 16.0 8 STGCN 0.985 0.002
10 GConvGRU 0.081 12.0 8 IT-STGCN 1.007 0.005
11 GConvGRU 0.081 12.0 8 STGCN 1.008 0.006
12 GConvLSTM 0.081 16.0 8 IT-STGCN 0.997 0.022
13 GConvLSTM 0.081 16.0 8 STGCN 0.989 0.009
14 LRGCN 0.081 12.0 8 IT-STGCN 0.985 0.002
15 LRGCN 0.081 12.0 8 STGCN 0.985 0.003
16 TGCN 0.081 12.0 8 IT-STGCN 0.992 0.015
17 TGCN 0.081 12.0 8 STGCN 0.999 0.013

Montevideobus (lags=4)

Montevideobus_linear = pd.concat([pd.read_csv('../Data/monte_linear.csv'), # monte linear interpolation 결과
                                pd.read_csv('../Data/GCLSTM_monte_linear.csv')])
Montevideobus_base = df.query("dataset=='monte' and mtype not in ['rand','block'] and lags==4 and method !='GNAR'")
# Montevideobus_random = pd.concat([df.query("dataset=='wikimath' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GConvGRU' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GConvLSTM' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GCLSTM' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==2 and lags==4 and epoch==50 and model=='LRGCN' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNH' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNO' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==8 and lags==4 and epoch==50 and model=='TGCN' and mrate in [0.3, 0.5, 0.7, 0.8]"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='rand' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='DCRNN' and mrate in [0.3, 0.5, 0.7, 0.8]")])
# Montevideobus_block = pd.concat([df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==8 and epoch==50 and model=='GConvGRU'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GConvLSTM'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='GCLSTM'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==2 and lags==4 and epoch==50 and model=='LRGCN'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='DyGrEncoder'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNH'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and lags==4 and epoch==50 and model=='EvolveGCNO'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==182 and lags==4 and epoch==50 and model=='TGCN'"),
#                             df.query("dataset=='monte' and model!='GNAR' and mtype=='block' and inter_method == 'nearest' and nof_filters==12 and lags==4 and epoch==50 and model=='DCRNN'")])
# Montevideobus_GNAR = df.query("model=='GNAR' and dataset=='monte' and lags==4")
Montevideobus_final = pd.concat([Montevideobus_base,Montevideobus_linear])

Baseline

pd.merge(df.query("dataset=='monte' and mrate not in ['random','block'] and lags==4 and method !='GNAR'").groupby(['model','lags','epoch'])['mse'].mean().reset_index(),
         df.query("dataset=='monte' and mrate not in ['random','block'] and lags==4 and method !='GNAR'").groupby(['model','lags','epoch'])['mse'].std().reset_index(),
         on=['model','lags','epoch']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model lags epoch mean std
0 DCRNN 4 50.0 1.034 0.112
1 DyGrEncoder 4 50.0 1.153 0.185
2 EvolveGCNH 4 50.0 1.594 0.457
3 EvolveGCNO 4 50.0 1.763 0.570
4 GCLSTM 4 50.0 1.017 0.072
5 GConvGRU 4 50.0 1.064 0.192
6 GConvLSTM 4 50.0 1.013 0.085
7 LRGCN 4 50.0 0.981 0.022
8 TGCN 4 50.0 1.046 0.085

Random

pd.merge(df.query("dataset=='monte' and mtype=='rand' and inter_method=='nearest' and mrate==0.8").groupby(['model','mrate','nof_filters','lags','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='monte' and mtype=='rand' and inter_method=='nearest' and mrate==0.8").groupby(['model','mrate','nof_filters','lags','inter_method','method'])['mse'].std().reset_index(),
         on=['model','mrate','nof_filters','inter_method','method','mrate','lags']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate nof_filters lags inter_method method mean std
0 DCRNN 0.8 12.0 4 nearest IT-STGCN 1.111 0.036
1 DCRNN 0.8 12.0 4 nearest STGCN 1.225 0.073
2 DyGrEncoder 0.8 12.0 4 nearest IT-STGCN 1.216 0.118
3 DyGrEncoder 0.8 12.0 4 nearest STGCN 1.358 0.149
4 EvolveGCNH 0.8 12.0 4 nearest IT-STGCN 1.845 0.504
5 EvolveGCNH 0.8 12.0 4 nearest STGCN 2.158 0.545
6 EvolveGCNO 0.8 12.0 4 nearest IT-STGCN 2.263 0.476
7 EvolveGCNO 0.8 12.0 4 nearest STGCN 2.623 0.693
8 GCLSTM 0.8 12.0 4 nearest IT-STGCN 1.032 0.028
9 GCLSTM 0.8 12.0 4 nearest STGCN 1.140 0.061
10 GConvGRU 0.8 12.0 4 nearest IT-STGCN 1.096 0.019
11 GConvGRU 0.8 12.0 4 nearest STGCN 1.516 0.040
12 GConvLSTM 0.8 12.0 4 nearest IT-STGCN 1.156 0.062
13 GConvLSTM 0.8 12.0 4 nearest STGCN 1.134 0.069
14 LRGCN 0.8 2.0 4 nearest IT-STGCN 0.982 0.013
15 LRGCN 0.8 2.0 4 nearest STGCN 0.989 0.029
16 TGCN 0.8 8.0 4 nearest IT-STGCN 1.073 0.024
17 TGCN 0.8 8.0 4 nearest STGCN 1.218 0.086

Block

pd.merge(df.query("dataset=='monte' and mtype=='block' and inter_method=='nearest'").groupby(['model','mrate','lags','inter_method','method'])['mse'].mean().reset_index(),
         df.query("dataset=='monte' and mtype=='block' and inter_method=='nearest'").groupby(['model','mrate','lags','inter_method','method'])['mse'].std().reset_index(),
         on=['model','method','mrate','inter_method','lags']).rename(columns={'mse_x':'mean','mse_y':'std'}).round(3)
model mrate lags inter_method method mean std
0 DCRNN 0.149 4 nearest IT-STGCN 0.940 0.001
1 DCRNN 0.149 4 nearest STGCN 0.956 0.003
2 DyGrEncoder 0.149 4 nearest IT-STGCN 1.005 0.046
3 DyGrEncoder 0.149 4 nearest STGCN 1.030 0.044
4 EvolveGCNH 0.149 4 nearest IT-STGCN 1.392 0.110
5 EvolveGCNH 0.149 4 nearest STGCN 1.612 0.216
6 EvolveGCNO 0.149 4 nearest IT-STGCN 1.345 0.110
7 EvolveGCNO 0.149 4 nearest STGCN 1.766 0.123
8 GCLSTM 0.149 4 nearest IT-STGCN 0.959 0.008
9 GCLSTM 0.149 4 nearest STGCN 0.956 0.005
10 GConvGRU 0.149 4 nearest IT-STGCN 0.932 0.002
11 GConvGRU 0.149 4 nearest STGCN 0.935 0.004
12 GConvLSTM 0.149 4 nearest IT-STGCN 0.949 0.008
13 GConvLSTM 0.149 4 nearest STGCN 0.950 0.005
14 GNAR 0.149 4 nearest GNAR 1.062 0.000
15 LRGCN 0.149 4 nearest IT-STGCN 0.978 0.024
16 LRGCN 0.149 4 nearest STGCN 0.977 0.020
17 TGCN 0.149 4 nearest IT-STGCN 0.984 0.007
18 TGCN 0.149 4 nearest STGCN 0.985 0.005