File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
ads/opctl/operator/lowcode/forecast/model Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -252,10 +252,16 @@ def generate_report(self):
252252 output_dir = self .spec .output_directory .url
253253 backtest_report_name = "backtest_stats.csv"
254254 backtest_stats = pd .read_csv (f"{ output_dir } /{ backtest_report_name } " )
255+ average_dict = backtest_stats .mean ().to_dict ()
256+ del average_dict ['backtest' ]
257+ best_model = min (average_dict , key = average_dict .get )
255258 backtest_text = rc .Heading ("Back Testing Metrics" , level = 2 )
259+ summary_text = rc .Text (
260+ f"Overall, the average scores for the models are { average_dict } , with { best_model } "
261+ f" being identified as the top-performing model during backtesting." )
256262 backtest_table = rc .DataTable (backtest_stats , index = True )
257263 liner_plot = get_auto_select_plot (backtest_stats )
258- backtest_sections = [backtest_text , backtest_table , liner_plot ]
264+ backtest_sections = [backtest_text , backtest_table , summary_text , liner_plot ]
259265
260266
261267 forecast_plots = []
You can’t perform that action at this time.
0 commit comments