@@ -257,13 +257,25 @@ def _generate_report(self) -> tuple:
257
257
"## Forecast Overview \n "
258
258
"These plots show your forecast in the context of historical data."
259
259
)
260
+
261
+ # Default title generated by autots has target_col in it. Modified function to get rid of it.
262
+ def get_title (idx , target ):
263
+ from autots .models .base import extract_single_series_from_horz
264
+ title_prelim = extract_single_series_from_horz (
265
+ self .models .df_wide_numeric .columns [idx ],
266
+ model_name = self .prediction .model_name ,
267
+ model_parameters = self .prediction .model_parameters ,
268
+ )[0 :80 ]
269
+ return f"{ utils .convert_target (target , self .original_target_column )} with model { title_prelim } "
270
+
260
271
sec_1 = utils ._select_plot_list (
261
- lambda idx , * args : self .prediction .plot (
272
+ lambda idx , target , * args : self .prediction .plot (
262
273
self .models .df_wide_numeric ,
263
274
series = self .models .df_wide_numeric .columns [idx ],
264
275
start_date = self .models .df_wide_numeric .reset_index ()[
265
276
self .spec .datetime_column .name
266
277
].min (),
278
+ title = get_title (idx , target )
267
279
),
268
280
target_columns = self .target_columns ,
269
281
original_target_column = self .original_target_column
@@ -325,7 +337,7 @@ def _generate_report(self) -> tuple:
325
337
dp .DataTable (
326
338
local_ex_df .div (local_ex_df .abs ().sum (axis = 1 ), axis = 0 ) * 100 ,
327
339
label = utils .convert_target (s_id , self .original_target_column ),
328
- )
340
+ )
329
341
for s_id , local_ex_df in self .local_explanation .items ()
330
342
]
331
343
local_explanation_section = (
@@ -365,7 +377,7 @@ def _generate_train_metrics(self) -> pd.DataFrame:
365
377
Generate Training Metrics when fitted data is not available.
366
378
The method that needs to be implemented on the particular model level.
367
379
368
- metrics Sales_Store 1
380
+ metrics Store 1
369
381
sMAPE 26.19
370
382
MAPE 2.96E+18
371
383
RMSE 2014.192531
@@ -376,4 +388,7 @@ def _generate_train_metrics(self) -> pd.DataFrame:
376
388
scores = pd .DataFrame (
377
389
self .models .best_model_per_series_score (), columns = ["AutoTS Score" ]
378
390
).T
379
- return pd .concat ([mapes , scores ])
391
+ df = pd .concat ([mapes , scores ])
392
+ new_column_names = {old_name : utils .convert_target (old_name , self .original_target_column )
393
+ for old_name in df .columns }
394
+ return df .rename (columns = new_column_names )
0 commit comments