diff --git a/docs/pages/Benchmarks.py b/docs/pages/Benchmarks.py index 4db57fa..c7df765 100644 --- a/docs/pages/Benchmarks.py +++ b/docs/pages/Benchmarks.py @@ -36,8 +36,6 @@ def compare_datasets(): comparison["Dataset"] = dataset.label comparison_combined = pd.concat([comparison_combined, comparison]) - comparison_combined.to_csv("comparisons.csv", index=False) - return comparison_combined @@ -94,3 +92,16 @@ def compare_datasets(): ) st.dataframe(ecps_df, use_container_width=True) + +st.subheader("Relative errors by dataset") + +st.write( + "The table below shows the relative error for each target in each dataset, and the change after moving the ECPS." +) + +long_to_wide = df.pivot(index="Target", columns="Dataset", values="Abs. Error %").reset_index() +long_to_wide["CPS to ECPS change"] = long_to_wide["Enhanced CPS 2024"] - long_to_wide["CPS 2024 (2022-based)"] +long_to_wide["PUF to ECPS change"] = long_to_wide["Enhanced CPS 2024"] - long_to_wide["PUF 2024 (2022-based)"] +long_to_wide.sort_values("cps_to_ecps_change", ascending=False) + +st.dataframe(long_to_wide, use_container_width=True)