#!/usr/bin/env bash

# run the models multiple times to check for the reproducibility
for i in {1..1}

do
#    echo Iteration $i of m4_demo
    ####### LSTM Cell
    #### with windowing

    python ./generic_model_trainer.py --dataset_name m4_demo_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_demo_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_demo_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_demo_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_demo_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_demo_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_demo_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_demo.txt --cell_type GRU --input_size 15 --forecast_horizon 18 --optimizer adagrad --hyperparameter_tuning smac --model_type seq2seqwithdenselayer --input_format moving_window --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_demo.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_finance_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_finance_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_finance_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_finance_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_finance_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_finance_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_finance_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_finance.txt --cell_type GRU --input_size 15 --forecast_horizon 18 --optimizer adagrad --hyperparameter_tuning smac --model_type seq2seqwithdenselayer --input_format moving_window --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_finance.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_industry_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_industry_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_industry_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_industry_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_industry_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_industry_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_industry_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_industry.txt --cell_type GRU --input_size 15 --forecast_horizon 18 --optimizer adagrad --hyperparameter_tuning smac --model_type seq2seqwithdenselayer --input_format moving_window --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_industry.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_micro_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_micro_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_micro_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_micro_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_micro_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_micro_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_micro_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_micro.txt --cell_type GRU --input_size 15 --forecast_horizon 18 --optimizer adagrad --hyperparameter_tuning smac --model_type seq2seqwithdenselayer --input_format moving_window --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_micro.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_macro_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_macro_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_macro_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_macro_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_macro.txt --cell_type GRU --input_size 15 --forecast_horizon 18 --optimizer adagrad --hyperparameter_tuning smac --model_type seq2seqwithdenselayer --input_format moving_window --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_macro.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_other_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_other_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_other_18i5.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_other_18i5v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_other_18i5v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_other_18i5.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_other_18i5.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_other.txt --cell_type GRU --input_size 5 --forecast_horizon 18 --optimizer adagrad --hyperparameter_tuning smac --model_type seq2seqwithdenselayer --input_format moving_window --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_other.txt --without_stl_decomposition 1 --seed $i



    python ./generic_model_trainer.py --dataset_name m4_demo_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_demo_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_demo_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_demo_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_demo_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_demo_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_demo_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_demo.txt --input_size 15 --forecast_horizon 18 --optimizer cocob --hyperparameter_tuning smac --model_type stacking --input_format moving_window --with_accumulated_error 1 --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_demo.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_finance_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_finance_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_finance_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_finance_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_finance_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_finance_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_finance_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_finance.txt --input_size 15 --forecast_horizon 18 --optimizer cocob --hyperparameter_tuning smac --model_type stacking --input_format moving_window --with_accumulated_error 1 --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_finance.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_industry_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_industry_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_industry_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_industry_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_industry_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_industry_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_industry_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_industry.txt --input_size 15 --forecast_horizon 18 --optimizer cocob --hyperparameter_tuning smac --model_type stacking --input_format moving_window --with_accumulated_error 1 --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_industry.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_micro_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_micro_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_micro_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_micro_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_micro_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_micro_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_micro_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_micro.txt --input_size 15 --forecast_horizon 18 --optimizer cocob --hyperparameter_tuning smac --model_type stacking --input_format moving_window --with_accumulated_error 1 --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_micro.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_macro_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_macro_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_macro_18i15v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_macro_18i15.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_macro_18i15.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_macro.txt --input_size 15 --forecast_horizon 18 --optimizer cocob --hyperparameter_tuning smac --model_type stacking --input_format moving_window --with_accumulated_error 1 --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_macro.txt --without_stl_decomposition 1 --seed $i

    python ./generic_model_trainer.py --dataset_name m4_other_without_stl --contain_zero_values 0 --initial_hyperparameter_values_file configs/initial_hyperparameter_values/m4_other_adagrad --binary_train_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_other_18i5.tfrecords --binary_valid_file_train_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_other_18i5v.tfrecords --binary_train_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_monthly_other_18i5v.tfrecords --binary_test_file_test_mode datasets/binary_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_other_18i5.tfrecords --txt_test_file datasets/text_data/M4/moving_window/without_stl_decomposition/m4_test_monthly_other_18i5.txt --actual_results_file datasets/text_data/M4/m4_result_monthly_other.txt --input_size 5 --forecast_horizon 18 --optimizer cocob --hyperparameter_tuning smac --model_type stacking --input_format moving_window --with_accumulated_error 1 --seasonality_period 12 --original_data_file datasets/text_data/M4/original_m4_other.txt --without_stl_decomposition 1 --seed $i

wait
done
echo All Iterations Completed!
