# ) # ensemble_optimization( # root_path=root_path, # station='zjs', # decomposer='vmd', # lev=11, # variables=variables, # orig_df=orig, # pattern='one_model_'+str(lead)+'_ahead_hindcast_pacf', # ) # ensemble_optimization( # root_path=root_path, # station='zjs', # decomposer='vmd', # lev=11, # variables=variables, # orig_df=orig, # pattern='one_model_'+str(lead)+'_ahead_hindcast_pacf_mis', # ) ensemble_optimization( root_path=root_path, station='zjs', decomposer='vmd', lev=11, variables=variables, orig_df=orig, criterion='NMSE', pattern='one_model_1_ahead_forecast_pacf_loss_nmse', ) plt.show()
sys.path.append(root_path + '/tools/') from plot_utils import plot_rela_pred, plot_history, plot_error_distribution, plot_subsignals_preds from ensemble import ensemble_optimization from metrics_ import PPTS from variables import variables orig = pd.read_excel( root_path + '/time_series/ZhangJiaShanDailyFlow1997-2014.xlsx')['DailyFlow'] for lead in [1, 3, 5, 7]: ensemble_optimization( root_path=root_path, station='zjs', decomposer='eemd', lev=12, variables=variables, orig_df=orig, pattern='multi_models_' + str(lead) + '_ahead_forecast_pacf', ) ensemble_optimization( root_path=root_path, station='zjs', decomposer='eemd', lev=12, variables=variables, orig_df=orig, pattern='one_model_' + str(lead) + '_ahead_forecast_pacf', ) ensemble_optimization( root_path=root_path,
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error, mean_squared_log_error import os root_path = os.path.os.path.dirname(os.path.abspath('__file__')) # root_path = os.path.abspath(os.path.join(root_path, os.path.pardir)) # root_path = os.path.abspath(os.path.join(root_path, os.path.pardir)) print(10*'-'+' Root Path: {}'.format(root_path)) import sys sys.path.append(root_path+'/tools/') from plot_utils import plot_rela_pred,plot_history,plot_error_distribution,plot_subsignals_preds from ensemble import ensemble_optimization from metrics_ import PPTS from variables import variables orig = pd.read_excel(root_path+'/time_series/Test.xlsx')['DailyFlow'] ensemble_optimization( root_path=root_path, station='test', decomposer='test', lev=3, variables=variables, orig_df=orig, pattern='multi_models_1_ahead_forecast', )
# ensemble_optimization( # root_path=root_path, # station='yx', # decomposer='wd', # lev=lev, # variables=variables, # orig_df=orig, # pattern='one_model_'+str(lead)+'_ahead_forecast_pacf', # wavelet=wavelet, # ) # ensemble_optimization( # root_path=root_path, # station='yx', # decomposer='wd', # lev=lev, # variables=variables, # orig_df=orig, # pattern='one_model_'+str(lead)+'_ahead_forecast_pacf_mis', # wavelet=wavelet, # ) ensemble_optimization( root_path=root_path, station='yx', decomposer='wd', lev=lev, variables=variables, orig_df=orig, pattern='one_model_' + str(lead) + '_ahead_hindcast_pacf_mis', wavelet=wavelet, )
import pandas as pd import numpy as np import math import matplotlib.pyplot as plt from sklearn.metrics import r2_score, mean_absolute_error, mean_squared_error, mean_squared_log_error import os root_path = os.path.os.path.dirname(os.path.abspath('__file__')) # root_path = os.path.abspath(os.path.join(root_path, os.path.pardir)) # root_path = os.path.abspath(os.path.join(root_path, os.path.pardir)) print(10*'-'+' Root Path: {}'.format(root_path)) import sys sys.path.append(root_path+'/tools/') from plot_utils import plot_rela_pred,plot_history,plot_error_distribution,plot_subsignals_preds from ensemble import ensemble_optimization from metrics_ import PPTS from variables import variables orig = pd.read_excel(root_path+'/time_series/YangXianDailyFlow1997-2014.xlsx')['DailyFlow'] for leading_time in [1,3,5,7]: ensemble_optimization( root_path=root_path, station='yx', variables=variables, orig_df=orig, pattern=str(leading_time)+'_ahead', )
import sys sys.path.append(root_path + '/tools/') from plot_utils import plot_rela_pred, plot_history, plot_error_distribution, plot_subsignals_preds from ensemble import ensemble_optimization from metrics_ import PPTS from variables import variables orig = pd.read_excel( root_path + '/time_series/YangXianDailyFlow1997-2014.xlsx')['DailyFlow'] for lead in [1, 3, 5, 7]: ensemble_optimization( #multi-models ensemble forecasting root_path=root_path, station='yx', decomposer='eemd', lev=12, variables=variables, orig_df=orig, pattern='multi_models_' + str(lead) + '_ahead_forecast_pacf', ) ensemble_optimization( #single-model forecasting root_path=root_path, station='yx', decomposer='eemd', lev=12, variables=variables, orig_df=orig, pattern='one_model_' + str(lead) + '_ahead_forecast_pacf', ) ensemble_optimization( #single-model forecasting with most influential subsignals root_path=root_path,
for lead in [1,3,5,7]: # ensemble_optimization( # root_path=root_path, # station='yx', # decomposer='vmd', # lev=9, # variables=variables, # orig_df=orig, # pattern='multi_models_'+str(lead)+'_ahead_forecast_pacf', # ) ensemble_optimization( root_path=root_path, station='yx', decomposer='vmd', lev=9, variables=variables, orig_df=orig, pattern='one_model_'+str(lead)+'_ahead_forecast_pacf', ) # ensemble_optimization( # root_path=root_path, # station='yx', # decomposer='vmd', # lev=9, # variables=variables, # orig_df=orig, # pattern='one_model_'+str(lead)+'_ahead_forecast_pacf_mis', # ) # ensemble_optimization( # root_path=root_path,