Skip to content

Commit

Permalink
fix: Update test_main_engine
Browse files Browse the repository at this point in the history
  • Loading branch information
alexvazquez1988 committed May 31, 2024
1 parent 1cca320 commit 4db6fd9
Showing 1 changed file with 89 additions and 89 deletions.
178 changes: 89 additions & 89 deletions tests/forecast_engine/test_main_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,42 +210,42 @@ def ensemble_output_df():
"2024-06-01"
]
forecast_list = [
2.649917e+07,
3.113824e+07,
2.931963e+07,
2.431952e+07,
2.482144e+07,
6.939827e+06
25636100.0,
29363566.0,
28150300.0,
24343184.0,
24908472.0,
10135740.0
]
forecast_lower_list = [
2.425845e+07,
2.888590e+07,
2.690031e+07,
2.190020e+07,
2.240212e+07,
4.520505e+06
22820152.0,
26547532.0,
25334134.0,
21526832.0,
22091864.0,
7318807.0
]
forecast_upper_list = [
2.873989e+07,
3.339058e+07,
3.173895e+07,
2.673885e+07,
2.724076e+07,
9.359149e+06
28452048.0,
32179600.0,
30966468.0,
27159540.0,
27725078.0,
12952672.0
]
model_list = [
"HW_M/autoarima",
"HW_M/autoarima",
"HW_M/autoarima",
"HW_M/autoarima",
"HW_M/autoarima",
"HW_M/autoarima"
"HW_A/HW_M",
"HW_A/HW_M",
"HW_A/HW_M",
"HW_A/HW_M",
"HW_A/HW_M",
"HW_A/HW_M"
]

return pd.DataFrame(
{'forecast': forecast_list,
'forecast_lower': forecast_lower_list,
'forecast_upper': forecast_upper_list,
{'forecast': np.float32(forecast_list),
'forecast_lower': np.float32(forecast_lower_list),
'forecast_upper': np.float32(forecast_upper_list),
'date': pd.to_datetime(date_list),
'model': model_list
}
Expand Down Expand Up @@ -274,64 +274,64 @@ def predictions_output_df():
"2024-06-01"
]
forecast_list = [
2.617895e+07,
3.065635e+07,
2.884046e+07,
2.421146e+07,
2.465864e+07,
8.181910e+06,
2.445281e+07,
2.681939e+07,
2.710699e+07,
3.162014e+07,
2.650179e+07,
2.979881e+07,
2.425878e+07,
2.442758e+07,
2.483270e+07,
2.498424e+07,
1.457374e+07,
5.697744e+06
25120850.0,
30190548.0,
27727190.0,
23190936.0,
23293430.0,
6018486.0,
24452806.0,
26819394.0,
27106994.0,
31620138.0,
26501792.0,
29798808.0,
24258784.0,
24427584.0,
24832702.0,
24984242.0,
14573735.0,
5697744.0
]
forecast_lower_list = [
2.169750e+07,
2.615167e+07,
2.400181e+07,
1.937282e+07,
1.982000e+07,
3.343266e+06,
1.882091e+07,
2.681939e+07,
2.147493e+07,
3.162014e+07,
2.086946e+07,
2.979881e+07,
1.862608e+07,
2.442758e+07,
1.919949e+07,
2.498424e+07,
8.939870e+06,
5.697744e+06
25119470.0,
30189138.0,
27725568.0,
23189284.0,
23291702.0,
6016737.5,
18820912.0,
26819394.0,
21474926.0,
31620138.0,
20869460.0,
29798808.0,
18626078.0,
24427584.0,
19199490.0,
24984240.0,
8939870.0,
5697744.0
]
forecast_upper_list = [
3.066039e+07,
3.516102e+07,
3.367910e+07,
2.905011e+07,
2.949728e+07,
1.302055e+07,
3.008470e+07,
2.681939e+07,
3.273906e+07,
3.162014e+07,
3.213413e+07,
2.979881e+07,
2.989149e+07,
2.442759e+07,
3.046591e+07,
2.498424e+07,
2.020760e+07,
5.697744e+06
25122230.0,
30191956.0,
27728812.0,
23192590.0,
23295156.0,
6020234.5,
30084700.0,
26819394.0,
32739062.0,
31620138.0,
32134126.0,
29798808.0,
29891492.0,
24427586.0,
30465914.0,
24984242.0,
20207600.0,
5697744.5
]
model_list = [
"autoarima",
Expand All @@ -355,11 +355,11 @@ def predictions_output_df():
]

return pd.DataFrame(
{'forecast': forecast_list,
'forecast_lower': forecast_lower_list,
'forecast_upper': forecast_upper_list,
{'date': pd.to_datetime(date_list),
'forecast': np.float32(forecast_list),
'forecast_lower': np.float32(forecast_lower_list),
'forecast_upper': np.float32(forecast_upper_list),
'model': model_list,
'date': pd.to_datetime(date_list),
}
)

Expand All @@ -368,13 +368,13 @@ def models_ranked_output_df():

model_list = [
"HW_M",
"autoarima",
"HW_A"
"HW_A",
"autoarima"
]
error_list = [
2.123064e-08,
7.825683e-02,
2.285561e-01
2.285561e-01,
2.421447e-01
]
ranking_list = [
1,
Expand Down

0 comments on commit 4db6fd9

Please sign in to comment.