import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
Import
#---#
import plotly.express as px
import plotly.graph_objects as go
import plotly.io as pio
= "plotly"
pd.options.plotting.backend = "plotly_white" pio.templates.default
import pickle
Data
# GConvGRU
= pd.read_csv('../Data/Final_Simulation_GConvGRU_pedal_wiki_GSO.csv')
pedal_wiki_GSO_GConvGRU 'model']='GConvGRU'
pedal_wiki_GSO_GConvGRU[
# GConvLSTM
= pd.read_csv('../Data/Final_Simulation_GConvLSTM_pedal_wiki_GSO.csv')
pedal_wiki_GSO_GConvLSTM 'model']='GConvLSTM'
pedal_wiki_GSO_GConvLSTM[
# GCLSTM
= pd.read_csv('../Data/Final_Simulation_GCLSTM_pedal_wiki_GSO.csv')
pedal_wiki_GSO_GCLSTM 'model']='GCLSTM'
pedal_wiki_GSO_GCLSTM[
# DCRNN
= pd.read_csv('../Data/Final_Simulation_DCRNN_pedal_wiki_GSO.csv')
pedal_wiki_GSO_DCRNN 'model']='DCRNN'
pedal_wiki_GSO_DCRNN[
# LRGCN
= pd.read_csv('../Data/Final_Simulation_LRGCN_pedal_wiki_GSO.csv')
pedal_wiki_GSO_LRGCN 'model']='LRGCN'
pedal_wiki_GSO_LRGCN[
# TGCN
= pd.read_csv('../Data/Final_Simulation_TGCN_pedal_wiki_GSO.csv')
pedal_wiki_GSO_TGCN 'model']='TGCN'
pedal_wiki_GSO_TGCN[
# EvolveGCNO
= pd.read_csv('../Data/Final_Simulation_EvolveGCNO_pedal_wiki_GSO.csv')
pedal_wiki_GSO_EvolveGCNO 'model']='EvolveGCNO'
pedal_wiki_GSO_EvolveGCNO[
# DYGRENCODER
= pd.read_csv('../Data/Final_Simulation_DYGRENCODER_pedal_wiki_GSO.csv')
pedal_wiki_GSO_DYGRENCODER 'model']='DyGrEncoder'
pedal_wiki_GSO_DYGRENCODER[
# EvolveGCNH
= pd.read_csv('../Data/Final_Simulation_EvolveGCNH_pedal_wiki_GSO.csv')
pedal_wiki_GSO_EvolveGCNH 'model']='EvolveGCNH'
pedal_wiki_GSO_EvolveGCNH[
# GNAR
= pd.read_csv('../Data/Final_Simulation_GNAR_wiki_GSO.csv')
wiki_GSO_GNAR 'model']='GNAR'
wiki_GSO_GNAR[
= pd.read_csv('../Data/df_fig.csv')
df
= 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
df
Unnamed: 0 | dataset | method | mrate | mtype | lags | nof_filters | inter_method | epoch | mse | calculation_time | model | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 0 | fivenodes | STGCN | 0.0 | NaN | 2 | 12.0 | NaN | 50.0 | 0.729374 | 80.985221 | GConvGRU |
1 | 1 | fivenodes | STGCN | 0.0 | NaN | 2 | 12.0 | NaN | 50.0 | 0.729082 | 80.891788 | GConvGRU |
2 | 2 | fivenodes | STGCN | 0.7 | rand | 2 | 12.0 | linear | 50.0 | 1.892262 | 81.976547 | GConvGRU |
3 | 3 | fivenodes | STGCN | 0.7 | rand | 2 | 12.0 | nearest | 50.0 | 2.211288 | 87.803869 | GConvGRU |
4 | 4 | fivenodes | STGCN | 0.8 | rand | 2 | 12.0 | linear | 50.0 | 2.072818 | 103.648742 | GConvGRU |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
26786 | 26786 | pedalme | GNAR | 0.8 | rand | 4 | NaN | nearest | NaN | 1.302679 | 0.023105 | GNAR |
26787 | 26787 | pedalme | GNAR | 0.5 | rand | 4 | NaN | linear | NaN | 1.302679 | 0.022839 | GNAR |
26788 | 26788 | pedalme | GNAR | 0.5 | rand | 4 | NaN | nearest | NaN | 1.302679 | 0.023041 | GNAR |
26789 | 26789 | pedalme | GNAR | 0.8 | rand | 4 | NaN | linear | NaN | 1.302679 | 0.060872 | GNAR |
26790 | 26790 | pedalme | GNAR | 0.8 | rand | 4 | NaN | nearest | NaN | 1.302679 | 0.023526 | GNAR |
26791 rows × 12 columns
df2
dataset | method | mrate | mtype | lags | nof_filters | inter_method | epoch | mse | calculation_time | model | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | pedalme | STGCN | 0.300000 | rand | 4 | 12.0 | linear | 50.0 | 1.557424 | 6.553443 | GConvGRU |
1 | pedalme | STGCN | 0.300000 | rand | 4 | 12.0 | nearest | 50.0 | 1.591089 | 7.995071 | GConvGRU |
2 | pedalme | STGCN | 0.600000 | rand | 4 | 12.0 | linear | 50.0 | 1.737521 | 7.022613 | GConvGRU |
3 | pedalme | STGCN | 0.600000 | rand | 4 | 12.0 | nearest | 50.0 | 1.675156 | 6.745583 | GConvGRU |
4 | pedalme | IT-STGCN | 0.300000 | rand | 4 | 12.0 | linear | 50.0 | 1.123114 | 12.278102 | GConvGRU |
... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
418 | wikimath | STGCN | 0.511945 | block | 8 | 12.0 | linear | 50.0 | 0.830234 | 255.170347 | EvolveGCNH |
419 | wikimath | IT-STGCN | 0.511945 | block | 8 | 12.0 | linear | 50.0 | 0.746624 | 630.021935 | EvolveGCNH |
0 | wikimath | GNAR | 0.511945 | block | 8 | NaN | nearest | NaN | 1.353637 | 143.252073 | GNAR |
1 | wikimath | GNAR | 0.511945 | block | 8 | NaN | nearest | NaN | 1.353637 | 211.333467 | GNAR |
2 | wikimath | GNAR | 0.511945 | block | 8 | NaN | nearest | NaN | 1.353637 | 218.516156 | GNAR |
3783 rows × 11 columns
px
FiveVTS
= pd.concat([
fivenodes 'dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==12) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='GConvGRU') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==12) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='GConvLSTM') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==4) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='GCLSTM') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==4) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='LRGCN') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==12) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='DyGrEncoder') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['lags']==2) &
df[(df['epoch']==50) & (df['model']=='EvolveGCNH') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['lags']==2) &
df[(df['epoch']==50) & (df['model']=='EvolveGCNO') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==12) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='TGCN') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))],
(df['dataset']=='fivenodes') & (df['mtype']=='rand') & (df['inter_method']=='linear') & (df['nof_filters']==2) &
df[(df['lags']==2) & (df['epoch']==50) & (df['model']=='DCRNN') & (df['mrate'].isin([0.3, 0.5, 0.6, 0.7, 0.8]))]
(df[
])
'model'] = pd.Categorical(fivenodes['model'], categories=["GConvGRU", "GConvLSTM", "GCLSTM", "LRGCN", "DyGrEncoder", "EvolveGCNH", "EvolveGCNO", "TGCN", "DCRNN"])
fivenodes['method'] = pd.Categorical(fivenodes['method'], categories=['STGCN', 'IT-STGCN'])
fivenodes[
'mrate'] = fivenodes['mrate'].astype(str)
fivenodes[= fivenodes.sort_values(by=['model','mrate'])
fivenodes
= px.box(fivenodes,x='mrate',y='mse',color='method',width=70, log_y=True,facet_col='model',facet_col_wrap=3)
fig
'xaxis']['title']['text']=''
fig.layout['xaxis2']['title']['text']=''
fig.layout['xaxis3']['title']['text']=''
fig.layout['yaxis']['title']['text']=''
fig.layout['yaxis4']['title']['text']='MSE(log scale)'
fig.layout['yaxis7']['title']['text']=''
fig.layout[
=True
fig.layout.xaxis4.showticklabels=True
fig.layout.xaxis5.showticklabels=True
fig.layout.xaxis6.showticklabels=True
fig.layout.xaxis7.showticklabels=True
fig.layout.xaxis8.showticklabels=True
fig.layout.xaxis9.showticklabels
=True
fig.layout.yaxis2.showticklabels=True
fig.layout.yaxis3.showticklabels=True
fig.layout.yaxis5.showticklabels=True
fig.layout.yaxis6.showticklabels=True
fig.layout.yaxis8.showticklabels=True
fig.layout.yaxis9.showticklabels
="seaborn")
fig.update_layout(template
for i in range(0, 9):
'marker']['color'] = 'blue'
fig.data[i]['name'] = 'Classic'
fig.data[i][for i in range(9, 17):
'marker']['color'] = 'red'
fig.data[i]['name'] = 'Proposed'
fig.data[i][
=dict(x=1, y=1, traceorder='normal', orientation='v'))
fig.update_layout(legend="FiveVTS")
fig.update_layout(title_text
=1200, width=2000)
fig.update_layout(heightlambda a: a.update(text=a.text.split("=")[-1]))
fig.for_each_annotation(=dict(
fig.update_layout(legend="top",
yanchor=0.99,
y="left",
xanchor=0.01
x
))
with open('fivenodes_fig.pkl', 'wb') as file:
file) pickle.dump(fig,
with open('fivenodes_fig.pkl', 'rb') as file:
= pickle.load(file)
fivenodes_fig
fivenodes_fig
Chickenpox
= pd.concat([
chickenpox "dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==16 & lags==4 & epoch==50 & model=='GConvGRU' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==32 & lags==4 & epoch==50 & model=='GConvLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==16 & lags==4 & epoch==50 & model=='GCLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==8 & lags==4 & epoch==50 & model=='LRGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==4 & epoch==50 & model=='DyGrEncoder' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & lags==4 & epoch==50 & model=='EvolveGCNH' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & lags==4 & epoch==50 & model=='EvolveGCNO' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==4 & epoch==50 & model=='TGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='chickenpox' & mtype=='rand' & inter_method == 'linear' & nof_filters==16 & lags==4 & epoch==50 & model=='DCRNN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)")
df.query(
])
'model'] = pd.Categorical(chickenpox['model'], categories=["GConvGRU","GConvLSTM","GCLSTM","LRGCN","DyGrEncoder","EvolveGCNH","EvolveGCNO","TGCN","DCRNN"])
chickenpox['method'] = pd.Categorical(chickenpox['method'], categories=['STGCN','IT-STGCN'])
chickenpox[
'mrate'] = chickenpox['mrate'].astype(str)
chickenpox[= chickenpox.sort_values(by=['model','mrate'])
chickenpox
= px.box(chickenpox,x='mrate',y='mse',color='method',width=70, log_y=True,facet_col='model',facet_col_wrap=3)
fig
'xaxis']['title']['text']=''
fig.layout['xaxis2']['title']['text']=''
fig.layout['xaxis3']['title']['text']=''
fig.layout['yaxis']['title']['text']=''
fig.layout['yaxis4']['title']['text']='MSE(log scale)'
fig.layout['yaxis7']['title']['text']=''
fig.layout[
=True
fig.layout.xaxis4.showticklabels=True
fig.layout.xaxis5.showticklabels=True
fig.layout.xaxis6.showticklabels=True
fig.layout.xaxis7.showticklabels=True
fig.layout.xaxis8.showticklabels=True
fig.layout.xaxis9.showticklabels
=True
fig.layout.yaxis2.showticklabels=True
fig.layout.yaxis3.showticklabels=True
fig.layout.yaxis5.showticklabels=True
fig.layout.yaxis6.showticklabels=True
fig.layout.yaxis8.showticklabels=True
fig.layout.yaxis9.showticklabels
for i in range(0, 9):
'marker']['color'] = 'blue'
fig.data[i]['name'] = 'Classic'
fig.data[i][for i in range(9, 17):
'marker']['color'] = 'red'
fig.data[i]['name'] = 'Proposed'
fig.data[i][
=dict(x=1, y=1, traceorder='normal', orientation='v'))
fig.update_layout(legend="Chickenpox")
fig.update_layout(title_text=1200, width=2000)
fig.update_layout(heightlambda a: a.update(text=a.text.split("=")[-1]))
fig.for_each_annotation(="seaborn")
fig.update_layout(template=dict(
fig.update_layout(legend="top",
yanchor=0.99,
y="left",
xanchor=0.01
x
))
with open('chickenpox_fig.pkl', 'wb') as file:
file) pickle.dump(fig,
with open('chickenpox_fig.pkl', 'rb') as file:
= pickle.load(file)
chickenpox_fig
chickenpox_fig
PedalMeDatasetLoader
= pd.concat([
pedalme "dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==4 & epoch==50 & model=='GConvGRU' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==2 & lags==4 & epoch==50 & model=='GConvLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==4 & lags==4 & epoch==50 & model=='GCLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==8 & lags==4 & epoch==50 & model=='LRGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==4 & epoch==50 & model=='DyGrEncoder' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & lags==4 & epoch==50 & model=='EvolveGCNH' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & lags==4 & epoch==50 & model=='EvolveGCNO' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==4 & epoch==50 & model=='TGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='pedalme' & mtype=='rand' & inter_method == 'linear' & nof_filters==8 & lags==4 & epoch==50 & model=='DCRNN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)")
df.query(=True)
], ignore_index
'model'] = pd.Categorical(pedalme['model'], categories=["GConvGRU", "GConvLSTM", "GCLSTM", "LRGCN", "DyGrEncoder", "EvolveGCNH", "EvolveGCNO", "TGCN", "DCRNN"], ordered=True)
pedalme['method'] = pd.Categorical(pedalme['method'], categories=['STGCN', 'IT-STGCN'], ordered=True)
pedalme[
'mrate'] = pedalme['mrate'].astype(str)
pedalme[= pedalme.sort_values(by=['model','mrate'])
pedalme
= px.box(pedalme,x='mrate',y='mse',color='method',width=70, log_y=True,facet_col='model',facet_col_wrap=3)
fig
'xaxis']['title']['text']=''
fig.layout['xaxis2']['title']['text']=''
fig.layout['xaxis3']['title']['text']=''
fig.layout['yaxis']['title']['text']=''
fig.layout['yaxis4']['title']['text']='MSE(log scale)'
fig.layout['yaxis7']['title']['text']=''
fig.layout[
=True
fig.layout.xaxis4.showticklabels=True
fig.layout.xaxis5.showticklabels=True
fig.layout.xaxis6.showticklabels=True
fig.layout.xaxis7.showticklabels=True
fig.layout.xaxis8.showticklabels=True
fig.layout.xaxis9.showticklabels
=True
fig.layout.yaxis2.showticklabels=True
fig.layout.yaxis3.showticklabels=True
fig.layout.yaxis5.showticklabels=True
fig.layout.yaxis6.showticklabels=True
fig.layout.yaxis8.showticklabels=True
fig.layout.yaxis9.showticklabels
for i in range(0, 9):
'marker']['color'] = 'blue'
fig.data[i]['name'] = 'Classic'
fig.data[i][for i in range(9, 17):
'marker']['color'] = 'red'
fig.data[i]['name'] = 'Proposed'
fig.data[i][
=dict(x=1, y=1, traceorder='normal', orientation='v'))
fig.update_layout(legend="Pedalme")
fig.update_layout(title_text=1200, width=2000)
fig.update_layout(heightlambda a: a.update(text=a.text.split("=")[-1]))
fig.for_each_annotation(="seaborn")
fig.update_layout(template=dict(
fig.update_layout(legend="top",
yanchor=0.99,
y="left",
xanchor=0.01
x
))
with open('pedalme_fig.pkl', 'wb') as file:
file) pickle.dump(fig,
with open('pedalme_fig.pkl', 'rb') as file:
= pickle.load(file)
pedalme_fig
pedalme_fig
WikiMathsDatasetLoader
= pd.concat([
wikimath "dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='GConvGRU' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==64 & lags==8 & epoch==50 & model=='GConvLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==64 & lags==8 & epoch==50 & model=='GCLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==32 & lags==8 & epoch==50 & model=='LRGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='DyGrEncoder' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & lags==8 & epoch==50 & model=='EvolveGCNH' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & lags==8 & epoch==50 & model=='EvolveGCNO' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='TGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)"),
df.query("dataset=='wikimath' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='DCRNN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.8)")
df.query(=True)
], ignore_index
'model'] = pd.Categorical(wikimath['model'], categories=["GConvGRU", "GConvLSTM", "GCLSTM", "LRGCN", "DyGrEncoder", "EvolveGCNH", "EvolveGCNO", "TGCN", "DCRNN"], ordered=True)
wikimath['method'] = pd.Categorical(wikimath['method'], categories=['STGCN', 'IT-STGCN'], ordered=True)
wikimath[
'mrate'] = wikimath['mrate'].astype(str)
wikimath[= wikimath.sort_values(by=['model','mrate'])
wikimath
= px.box(wikimath,x='mrate',y='mse',color='method',width=70, log_y=True,facet_col='model',facet_col_wrap=3)
fig
'xaxis']['title']['text']=''
fig.layout['xaxis2']['title']['text']=''
fig.layout['xaxis3']['title']['text']=''
fig.layout['yaxis']['title']['text']=''
fig.layout['yaxis4']['title']['text']='MSE(log scale)'
fig.layout['yaxis7']['title']['text']=''
fig.layout[
=True
fig.layout.xaxis4.showticklabels=True
fig.layout.xaxis5.showticklabels=True
fig.layout.xaxis6.showticklabels=True
fig.layout.xaxis7.showticklabels=True
fig.layout.xaxis8.showticklabels=True
fig.layout.xaxis9.showticklabels
=True
fig.layout.yaxis2.showticklabels=True
fig.layout.yaxis3.showticklabels=True
fig.layout.yaxis5.showticklabels=True
fig.layout.yaxis6.showticklabels=True
fig.layout.yaxis8.showticklabels=True
fig.layout.yaxis9.showticklabels
for i in range(0, 9):
'marker']['color'] = 'blue'
fig.data[i]['name'] = 'Classic'
fig.data[i][for i in range(9, 17):
'marker']['color'] = 'red'
fig.data[i]['name'] = 'Proposed'
fig.data[i][
=dict(x=1, y=1, traceorder='normal', orientation='v'))
fig.update_layout(legend="Wikimath")
fig.update_layout(title_text=1200, width=2000)
fig.update_layout(heightlambda a: a.update(text=a.text.split("=")[-1]))
fig.for_each_annotation(="seaborn")
fig.update_layout(template=dict(
fig.update_layout(legend="top",
yanchor=0.99,
y="left",
xanchor=0.01
x
))
with open('wikimath_fig.pkl', 'wb') as file:
file) pickle.dump(fig,
with open('wikimath_fig.pkl', 'rb') as file:
= pickle.load(file)
wikimath_fig
wikimath_fig
Windmillsmall
= pd.concat([
windmillsmall "dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='GConvGRU' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==16 & lags==8 & epoch==50 & model=='GConvLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==16 & lags==8 & epoch==50 & model=='GCLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='LRGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='DyGrEncoder' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & lags==8 & epoch==50 & model=='EvolveGCNH' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & lags==8 & epoch==50 & model=='EvolveGCNO' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==12 & lags==8 & epoch==50 & model=='TGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)"),
df.query("dataset=='windmillsmall' & mtype=='rand' & inter_method == 'linear' & nof_filters==4 & lags==8 & epoch==50 & model=='DCRNN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.6 | mrate == 0.7)")
df.query(=True)
], ignore_index
'model'] = pd.Categorical(windmillsmall['model'], categories=["GConvGRU", "GConvLSTM", "GCLSTM", "LRGCN", "DyGrEncoder", "EvolveGCNH", "EvolveGCNO", "TGCN", "DCRNN"], ordered=True)
windmillsmall['method'] = pd.Categorical(windmillsmall['method'], categories=['STGCN', 'IT-STGCN'], ordered=True)
windmillsmall[
'mrate'] = windmillsmall['mrate'].astype(str)
windmillsmall[= windmillsmall.sort_values(by=['model','mrate'])
windmillsmall
= px.box(windmillsmall,x='mrate',y='mse',color='method',width=70, log_y=True,facet_col='model',facet_col_wrap=3)
fig
'xaxis']['title']['text']=''
fig.layout['xaxis2']['title']['text']=''
fig.layout['xaxis3']['title']['text']=''
fig.layout['yaxis']['title']['text']=''
fig.layout['yaxis4']['title']['text']='MSE(log scale)'
fig.layout['yaxis7']['title']['text']=''
fig.layout[
=True
fig.layout.xaxis4.showticklabels=True
fig.layout.xaxis5.showticklabels=True
fig.layout.xaxis6.showticklabels=True
fig.layout.xaxis7.showticklabels=True
fig.layout.xaxis8.showticklabels=True
fig.layout.xaxis9.showticklabels
=True
fig.layout.yaxis2.showticklabels=True
fig.layout.yaxis3.showticklabels=True
fig.layout.yaxis5.showticklabels=True
fig.layout.yaxis6.showticklabels=True
fig.layout.yaxis8.showticklabels=True
fig.layout.yaxis9.showticklabels
for i in range(0, 9):
'marker']['color'] = 'blue'
fig.data[i]['name'] = 'Classic'
fig.data[i][for i in range(9, 17):
'marker']['color'] = 'red'
fig.data[i]['name'] = 'Proposed'
fig.data[i][
=dict(x=1, y=1, traceorder='normal', orientation='v'))
fig.update_layout(legend="Windmillsmall")
fig.update_layout(title_text=1200, width=2000)
fig.update_layout(heightlambda a: a.update(text=a.text.split("=")[-1]))
fig.for_each_annotation(="seaborn")
fig.update_layout(template=dict(
fig.update_layout(legend="top",
yanchor=0.99,
y="left",
xanchor=0.005
x
))
with open('windmillsmall_fig.pkl', 'wb') as file:
file) pickle.dump(fig,
with open('windmillsmall_fig.pkl', 'rb') as file:
= pickle.load(file)
windmillsmall_fig
windmillsmall_fig
Montevideobus
= pd.concat([
monte "dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==12 & lags==4 & epoch==50 & model=='GConvGRU' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==12 & lags==4 & epoch==50 & model=='GConvLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==12 & lags==4 & epoch==50 & model=='GCLSTM' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==2 & lags==4 & epoch==50 & model=='LRGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==12 & lags==4 & epoch==50 & model=='DyGrEncoder' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & lags==4 & epoch==50 & model=='EvolveGCNH' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & lags==4 & epoch==50 & model=='EvolveGCNO' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==8 & lags==4 & epoch==50 & model=='TGCN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)"),
df.query("dataset=='monte' & mtype=='rand' & inter_method == 'nearest' & nof_filters==12 & lags==4 & epoch==50 & model=='DCRNN' & (mrate == 0.3 | mrate == 0.5 | mrate == 0.7 | mrate == 0.8)")
df.query(=True)
], ignore_index
'model'] = pd.Categorical(monte['model'], categories=["GConvGRU", "GConvLSTM", "GCLSTM", "LRGCN", "DyGrEncoder", "EvolveGCNH", "EvolveGCNO", "TGCN", "DCRNN"], ordered=True)
monte['method'] = pd.Categorical(monte['method'], categories=['STGCN', 'IT-STGCN'], ordered=True)
monte[
'mrate'] = monte['mrate'].astype(str)
monte[= monte.sort_values(by=['model','mrate'])
monte
= px.box(monte,x='mrate',y='mse',color='method',width=70, log_y=True,facet_col='model',facet_col_wrap=3)
fig
'xaxis']['title']['text']=''
fig.layout['xaxis2']['title']['text']=''
fig.layout['xaxis3']['title']['text']=''
fig.layout['yaxis']['title']['text']=''
fig.layout['yaxis4']['title']['text']='MSE(log scale)'
fig.layout['yaxis7']['title']['text']=''
fig.layout[
=True
fig.layout.xaxis4.showticklabels=True
fig.layout.xaxis5.showticklabels=True
fig.layout.xaxis6.showticklabels=True
fig.layout.xaxis7.showticklabels=True
fig.layout.xaxis8.showticklabels=True
fig.layout.xaxis9.showticklabels
=True
fig.layout.yaxis2.showticklabels=True
fig.layout.yaxis3.showticklabels=True
fig.layout.yaxis5.showticklabels=True
fig.layout.yaxis6.showticklabels=True
fig.layout.yaxis8.showticklabels=True
fig.layout.yaxis9.showticklabels
for i in range(0, 9):
'marker']['color'] = 'blue'
fig.data[i]['name'] = 'Classic'
fig.data[i][for i in range(9, 17):
'marker']['color'] = 'red'
fig.data[i]['name'] = 'Proposed'
fig.data[i][
=dict(x=1, y=1, traceorder='normal', orientation='v'))
fig.update_layout(legend="MontevideoBus")
fig.update_layout(title_text=1200, width=2000)
fig.update_layout(heightlambda a: a.update(text=a.text.split("=")[-1]))
fig.for_each_annotation(="seaborn")
fig.update_layout(template=dict(
fig.update_layout(legend="top",
yanchor=0.99,
y="left",
xanchor=0.01
x
))
with open('monte_fig.pkl', 'wb') as file:
file) pickle.dump(fig,
with open('monte_fig.pkl', 'rb') as file:
= pickle.load(file)
monte_fig
monte_fig