File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
ads/opctl/operator/lowcode/forecast/model Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,7 @@ def _build_model(self) -> pd.DataFrame:
176
176
output_col = pd .DataFrame ()
177
177
yhat_upper_name = ForecastOutputColumns .UPPER_BOUND
178
178
yhat_lower_name = ForecastOutputColumns .LOWER_BOUND
179
+ hist_df = model .back_forecast ().forecast
179
180
180
181
for cat in self .categories :
181
182
output_i = pd .DataFrame ()
@@ -194,6 +195,10 @@ def _build_model(self) -> pd.DataFrame:
194
195
output_i ["forecast_value" ] = self .prediction .forecast [[cat_target ]]
195
196
output_i [yhat_upper_name ] = self .prediction .upper_forecast [[cat_target ]]
196
197
output_i [yhat_lower_name ] = self .prediction .lower_forecast [[cat_target ]]
198
+ output_i .iloc [
199
+ - hist_df .shape [0 ] - self .spec .horizon : - self .spec .horizon ,
200
+ output_i .columns .get_loc (f"fitted_value" ),
201
+ ] = hist_df [cat_target ]
197
202
198
203
output_i = output_i .reset_index ()
199
204
output_col = pd .concat ([output_col , output_i ])
You can’t perform that action at this time.
0 commit comments