diagnostics.oos_q_on_4q_performance_table()
Compute up/down classification accuracy by region and horizon.
Usage
diagnostics.oos_q_on_4q_performance_table(
df_results, region_measure, path=None
)Compares the sign of each nowcast to its corresponding outturn. Returns a pivot table of percentage accuracy grouped by region and quarters-to-publication.
Parameters
df_results: pd.DataFrame-
Out-of-sample results from
~ambric.run_out_of_sample_exercise(). region_measure: str-
Regional measure name to filter on.
path: Path | None = None-
Directory to save a CSV of the table. When
Noneno file is written.
Returns
pd.DataFrame-
pd.DataFrame: Pivot table of classification accuracy (%) with regions as rows and quarters-to-publication as columns.