Skip to content

Commit

Permalink
Add long to wide df
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilwoodruff committed Sep 6, 2024
1 parent c6daaa9 commit 8e3eab2
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions docs/pages/Benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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)

0 comments on commit 8e3eab2

Please sign in to comment.