Closed vinayakrajurs closed 2 years ago
Thank you i Figured it out
hello, can you tell me how to plot it out? I have this question too. Thank you!
Hi @DomineeringDragon ,
I have updated the code in "https://github.com/cure-lab/SCINet/blob/main/plot.py". Hope it will be helpful!
我在机器学习这一块只了解了一点皮毛,十分感谢你这么多次热心的帮助!
I'm trying to run the Code for the ETTh1 dataset using the following run command:
!python run_ETTh_10.py --data ETTh1 --features S --seq_len 96 --label_len 48 --pred_len 48 --hidden-size 4 --stacks 1 --levels 3 --lr 3e-3 --batch_size 8 --dropout 0.5 --model_name etth1_M_I48_O24_lr3e-3_bs8_dp0.5_h4_s1l3
and it runs successfully before early stopping at epoch 17 and i get the MAE and MSE values for both normalized and de-normalized data. `Args in experiment: Namespace(INN=1, RIN=False, batch_size=8, c_out=1, checkpoints='exp/ETT_checkpoints/', cols=None, concat_len=0, data='ETTh1', data_path='ETTh1.csv', dec_in=1, detail_freq='h', devices='0', dilation=1, dropout=0.5, embed='timeF', enc_in=1, evaluate=False, features='S', freq='h', gpu=0, groups=1, hidden_size=4.0, inverse=False, itr=0, kernel=5, label_len=48, lastWeight=1.0, levels=3, loss='mae', lr=0.003, lradj=1, model='SCINet', model_name='etth1_M_I48_O24_lr3e-3_bs8_dp0.5_h4_s1l3', num_decoder_layer=1, num_workers=0, patience=5, positionalEcoding=False, pred_len=48, resume=False, root_path='./datasets/', save=False, seq_len=96, single_step=0, single_step_output_One=0, stacks=1, target='OT', train_epochs=100, use_amp=False, use_gpu=True, use_multi_gpu=False, window_size=12) SCINet( (blocks1): EncoderTree( (SCINet_Tree): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) (SCINet_Tree_odd): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) (SCINet_Tree_odd): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) ) (SCINet_Tree_even): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) ) ) (SCINet_Tree_even): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) (SCINet_Tree_odd): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) ) (SCINet_Tree_even): SCINet_Tree( (workingblock): LevelSCINet( (interact): InteractorLevel( (level): Interactor( (split): Splitting() (phi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (psi): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (P): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) (U): Sequential( (0): ReplicationPad1d((3, 3)) (1): Conv1d(1, 4, kernel_size=(5,), stride=(1,)) (2): LeakyReLU(negative_slope=0.01, inplace=True) (3): Dropout(p=0.5, inplace=False) (4): Conv1d(4, 1, kernel_size=(3,), stride=(1,)) (5): Tanh() ) ) ) ) ) ) ) ) (projection1): Conv1d(96, 48, kernel_size=(1,), stride=(1,), bias=False) (div_projection): ModuleList() )After this a new folder in exp is formed exp/ETT_checkpoints/SCINet_ETTh1_ftS_sl96_ll48_pl48_lr0.003_bs8_hid4.0_s1_l3_dp0.5_invFalse_itr0
and there are 2 folders withing it 1.) ETTh148.bin 2.) checkpoint.pth Upon extracting it we get 1.) archive/data.pkl
When i try to convert this data.pkl file into a data frame by running this code:
import numpy as np import pandas as pd import pickle
df = pd.read_pickle('out.pkl') print(df)
I get the following error: unpicklingerror: a load persistent id instruction was encountered, but no persistent_load function was specified.How do i Plot the results of ETTh1 ? Thank you