Commit 9c0053b7 authored by chenzk's avatar chenzk
Browse files

v1.0

parents
Pipeline #953 canceled with stages
export CUDA_VISIBLE_DEVICES=1
model_name=iFlowformer
# model_name=Flowformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
export CUDA_VISIBLE_DEVICES=1
# model_name=iInformer
model_name=Informer
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
export CUDA_VISIBLE_DEVICES=1
model_name=iReformer
# model_name=Reformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
export CUDA_VISIBLE_DEVICES=1
model_name=iTransformer
#model_name=Transformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--itr 1 \
--train_epochs 3
export CUDA_VISIBLE_DEVICES=2
model_name=iFlowformer
# model_name=Flowformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--itr 1 \
--batch_size 128 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
export CUDA_VISIBLE_DEVICES=2
model_name=iInformer
#model_name=Informer
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--itr 1 \
--batch_size 128 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
export CUDA_VISIBLE_DEVICES=2
model_name=iReformer
#model_name=Reformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--itr 1 \
--batch_size 128 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
export CUDA_VISIBLE_DEVICES=2
model_name=iTransformer
#model_name=Transformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--itr 1 \
--batch_size 128 \
--train_epochs 3
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_192 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 192 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_336 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 336 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/weather/ \
--data_path weather.csv \
--model_id weather_96_720 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 720 \
--e_layers 2 \
--enc_in 21 \
--dec_in 21 \
--c_out 21 \
--des 'Exp' \
--batch_size 128 \
--itr 1
export CUDA_VISIBLE_DEVICES=0
# model_name=Flowformer
model_name=iFlowformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_48_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 48 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005\
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005\
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_192_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 192 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_336_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 336 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_720_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 720 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
export CUDA_VISIBLE_DEVICES=0
# model_name=Informer
model_name=iInformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_48_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 48 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_192_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 192 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_336_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 336 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_720_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 720 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
export CUDA_VISIBLE_DEVICES=0
# model_name=Reformer
model_name=iReformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_48_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 48 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_192_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 192 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_336_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 336 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_720_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 720 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
export CUDA_VISIBLE_DEVICES=0
# model_name=Transformer
model_name=iTransformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_48_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 48 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_192_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 192 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_336_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 336 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/electricity/ \
--data_path electricity.csv \
--model_id ECL_720_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 720 \
--pred_len 96 \
--e_layers 3 \
--enc_in 321 \
--dec_in 321 \
--c_out 321 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.0005 \
--itr 1
# iTransformer for Enlarged Lookback Window
This folder contains the implementation of the iTransformer for an enlarged lookback window. If you are new to this repo, we recommend you to read this [README](../multivariate_forecasting/README.md) first.
## Scripts
In each folder named after the dataset, we provide the iTransformers and the vanilla Transformers experiments under five increasing prediction lengths.
```
# iTransformer on the Traffic Dataset with gradually enlarged lookback windows.
bash ./scripts/increasing_lookback/Traffic/iTransformer.sh
```
You can change the ```model_name``` in the script to switch the selection of the vanilla Transformer and the inverted version.
## Results
<p align="center">
<img src="../../figures/increase_lookback.png" alt="" align=center />
</p>
The inverted framework empowers Transformers with improved performance on the enlarged lookback window.
\ No newline at end of file
export CUDA_VISIBLE_DEVICES=0
# model_name=Flowformer
model_name=iFlowformer
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_48_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 48 \
--pred_len 96 \
--e_layers 4 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.001 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_96_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 96 \
--pred_len 96 \
--e_layers 4 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.001 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_192_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 192 \
--pred_len 96 \
--e_layers 4 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.001 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_336_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 336 \
--pred_len 96 \
--e_layers 4 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.001 \
--itr 1
python -u run.py \
--is_training 1 \
--root_path ./dataset/traffic/ \
--data_path traffic.csv \
--model_id traffic_720_96 \
--model $model_name \
--data custom \
--features M \
--seq_len 720 \
--pred_len 96 \
--e_layers 4 \
--enc_in 862 \
--dec_in 862 \
--c_out 862 \
--des 'Exp' \
--d_model 512 \
--d_ff 512 \
--batch_size 16 \
--learning_rate 0.001 \
--itr 1
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
# Efficiency Improvement of iTransformer
Supposing the input multivariate time series has a shape of $T \times N$. The vanilla attention module has a complexity of $\mathcal{O}(L^2)$, where $L$ is the number of tokens.
* In Transformer, we have $L=T$ because of the manner of time points as tokens.
* In iTransformer, we have $L=N$ because of the manner of variates as tokens.
## Benefit from Efficient Attention
Since the attention mechanism is applied on the variate dimension in the inverted structure, efficient attention with reduced complexity essentially addresses the problem of numerous variates, which is ubiquitous in real-world applications.
We currently try out the linear complexity attention from [Flowformer](https://github.com/thuml/Flowformer), and the hardware-accelerated attention mechanism from [FlashAttention](https://github.com/shreyansh26/FlashAttention-PyTorch). It demonstrates efficiency improvement by adopting these novel attention mechanisms.
### Scripts
We provide the iTransformers with the FlashAttention module:
```
# iTransformer on the Traffic Dataset with hardware-friendly FlashAttention for acceleration
bash ./scripts/model_efficiency/Traffic/iFlashTransformer.sh
```
## Efficient Training Strategy
With the input flexibility of attention, the token number can vary from training to inference, **our model is the first one to be capable of training on arbitrary numbers of series**. We propose a novel training strategy for high-dimensional multivariate series by taking advantage of the [variate generation capability](../variate_generalization/README.md).
Concretely, we randomly choose part of the variates in each batch and only train the model with selected variates. Since the number of variate channels is flexible because of our inverting, the model can predict all the variates for predictions.
## Results
**Environments**: The batch size of training is fixed as 16 with comparable model hyperparameters. The experiments run on P100 (16G). We comprehensively compare the training speed, memory footprint, and performance of the following.
<p align="center">
<img src="../../figures/efficiency.png" alt="" align=center />
</p>
* The efficiency of iTransformer exceeds other Transformers in Weather with 21 variates. In Traffic with 862 variates, the memory footprints are basically the same, but iTransformer can be trained faster.
* iTransformer achieves particularly better performance on the dataset with numerous variates, since the multivariate correlations can be explicitly utilized.
* By adopting an efficient attention module or our proposed efficient training strategy on partial variates, iTransformer can enjoy the same level of speed and memory footprint as linear forecasters.
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment