@@ -257,13 +257,25 @@ def _generate_report(self) -> tuple:
257257 "## Forecast Overview \n "
258258 "These plots show your forecast in the context of historical data."
259259 )
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+
260271 sec_1 = utils ._select_plot_list (
261- lambda idx , * args : self .prediction .plot (
272+ lambda idx , target , * args : self .prediction .plot (
262273 self .models .df_wide_numeric ,
263274 series = self .models .df_wide_numeric .columns [idx ],
264275 start_date = self .models .df_wide_numeric .reset_index ()[
265276 self .spec .datetime_column .name
266277 ].min (),
278+ title = get_title (idx , target )
267279 ),
268280 target_columns = self .target_columns ,
269281 original_target_column = self .original_target_column
@@ -325,7 +337,7 @@ def _generate_report(self) -> tuple:
325337 dp .DataTable (
326338 local_ex_df .div (local_ex_df .abs ().sum (axis = 1 ), axis = 0 ) * 100 ,
327339 label = utils .convert_target (s_id , self .original_target_column ),
328- )
340+ )
329341 for s_id , local_ex_df in self .local_explanation .items ()
330342 ]
331343 local_explanation_section = (
@@ -365,7 +377,7 @@ def _generate_train_metrics(self) -> pd.DataFrame:
365377 Generate Training Metrics when fitted data is not available.
366378 The method that needs to be implemented on the particular model level.
367379
368- metrics Sales_Store 1
380+ metrics Store 1
369381 sMAPE 26.19
370382 MAPE 2.96E+18
371383 RMSE 2014.192531
@@ -376,4 +388,7 @@ def _generate_train_metrics(self) -> pd.DataFrame:
376388 scores = pd .DataFrame (
377389 self .models .best_model_per_series_score (), columns = ["AutoTS Score" ]
378390 ).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