Example #1
0
graphs_path = root_path + '/results_analysis/graphs/'
print(root_path)
import sys
sys.path.append(root_path)
from results_reader import read_two_stage, read_pure_esvr
from fit_line import compute_linear_fit, compute_list_linear_fit

h_records, h_predictions, h_r2, h_nrmse, h_mae, h_mape, h_ppts, h_timecost = read_pure_esvr(
    "Huaxian")
x_records, x_predictions, x_r2, x_nrmse, x_mae, x_mape, x_ppts, x_timecost = read_pure_esvr(
    "Xianyang")
z_records, z_predictions, z_r2, z_nrmse, z_mae, z_mape, z_ppts, z_timecost = read_pure_esvr(
    "Zhangjiashan")

h_vmd_records, h_vmd_predictions, h_vmd_r2, h_vmd_nrmse, h_vmd_mae, h_vmd_mape, h_vmd_ppts, h_vmd_timecost = read_two_stage(
    station="Huaxian",
    decomposer="vmd",
    predict_pattern="one_step_1_month_forecast")
x_vmd_records, x_vmd_predictions, x_vmd_r2, x_vmd_nrmse, x_vmd_mae, x_vmd_mape, x_vmd_ppts, x_vmd_timecost = read_two_stage(
    station="Xianyang",
    decomposer="vmd",
    predict_pattern="one_step_1_month_forecast")
z_vmd_records, z_vmd_predictions, z_vmd_r2, z_vmd_nrmse, z_vmd_mae, z_vmd_mape, z_vmd_ppts, z_vmd_timecost = read_two_stage(
    station="Zhangjiashan",
    decomposer="vmd",
    predict_pattern="one_step_1_month_forecast")

h_eemd_records, h_eemd_predictions, h_eemd_r2, h_eemd_nrmse, h_eemd_mae, h_eemd_mape, h_eemd_ppts, h_eemd_timecost = read_two_stage(
    station="Huaxian",
    decomposer="eemd",
    predict_pattern="one_step_1_month_forecast")
x_eemd_records, x_eemd_predictions, x_eemd_r2, x_eemd_nrmse, x_eemd_mae, x_eemd_mape, x_eemd_ppts, x_eemd_timecost = read_two_stage(
import matplotlib.pyplot as plt
plt.rcParams['font.size'] = 10
import pandas as pd
import numpy as np
import os
root_path = os.path.dirname(os.path.abspath('__file__'))
# root_path = os.path.abspath(os.path.join(root_path,os.path.pardir))
graphs_path = root_path + '/results_analysis/graphs/'
import sys
sys.path.append(root_path)
from results_reader import read_two_stage

h_records, h_predictions, h_r2, h_rmse, h_mae, h_mape, h_ppts, h_timecost = read_two_stage(
    station="Huaxian",
    decomposer="vmd",
    predict_pattern="one_step_1_month_forecast")
x_records, x_predictions, x_r2, x_rmse, x_mae, x_mape, x_ppts, x_timecost = read_two_stage(
    station="Xianyang",
    decomposer="vmd",
    predict_pattern="one_step_1_month_forecast")
z_records, z_predictions, z_r2, z_rmse, z_mae, z_mape, z_ppts, z_timecost = read_two_stage(
    station="Zhangjiashan",
    decomposer="vmd",
    predict_pattern="one_step_1_month_forecast")

plt.figure(figsize=(7.48, 7.48))
# plot predictions for huaxian station
records = h_records
predictions = h_predictions
plt.subplot(3, 2, 1)
plt.text(138, -12, '(a)')