odunbar commited on
Commit
82e4e6f
Β·
1 Parent(s): 74637ab

pipeline for figures

Browse files
Files changed (2) hide show
  1. src/common/leaderboard.py +6 -1
  2. src/streamlit_app.py +26 -8
src/common/leaderboard.py CHANGED
@@ -536,7 +536,12 @@ def render_leaderboard(
536
  bf = bf[bf[target_str_col] == selected_target]
537
  bf = bf[bf["abbreviation"].isin(selected_methods)]
538
 
539
- iters_df = bf[["abbreviation", "ensemble_size", "mean_iters"]].dropna(subset=["mean_iters"])
 
 
 
 
 
540
  all_ens_combos_iters = bf[["abbreviation", "ensemble_size"]].drop_duplicates()
541
  if not all_ens_combos_iters.empty:
542
  iters_ticks = sorted(all_ens_combos_iters["ensemble_size"].unique().tolist())
 
536
  bf = bf[bf[target_str_col] == selected_target]
537
  bf = bf[bf["abbreviation"].isin(selected_methods)]
538
 
539
+ iters_df = (
540
+ bf[["abbreviation", "ensemble_size", "mean_iters"]]
541
+ .dropna(subset=["mean_iters"])
542
+ .groupby(["abbreviation", "ensemble_size"], as_index=False)
543
+ .agg(mean_iters=("mean_iters", "mean"))
544
+ )
545
  all_ens_combos_iters = bf[["abbreviation", "ensemble_size"]].drop_duplicates()
546
  if not all_ens_combos_iters.empty:
547
  iters_ticks = sorted(all_ens_combos_iters["ensemble_size"].unique().tolist())
src/streamlit_app.py CHANGED
@@ -1,4 +1,5 @@
1
  import streamlit as st
 
2
 
3
  st.set_page_config(page_title="Calibration Benchmark", page_icon="🏠", layout="wide")
4
 
@@ -48,14 +49,31 @@ st.markdown(
48
  "data-assimilation and calibration algorithms:"
49
  )
50
 
51
- benchmarks = {
52
- "L63": "Lorenz-63 β€” 3-parameter chaotic attractor; low-dimensional, strongly nonlinear.",
53
- "L96": "Lorenz-96 β€” 40-variable atmospheric toy model; moderate dimension.",
54
- "L96_NN_FORCING": "Lorenz-96 with a neural-network forcing term; tests emulator-based methods.",
55
- "L96_SPATIAL_FORCING": "Lorenz-96 with spatially-varying forcing; higher heterogeneity.",
56
- }
57
- for name, desc in benchmarks.items():
58
- st.markdown(f"- **{name}** β€” {desc}")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
59
 
60
  st.subheader("Method families")
61
  st.markdown(
 
1
  import streamlit as st
2
+ from pathlib import Path
3
 
4
  st.set_page_config(page_title="Calibration Benchmark", page_icon="🏠", layout="wide")
5
 
 
49
  "data-assimilation and calibration algorithms:"
50
  )
51
 
52
+ _media = Path(__file__).parent / "media"
53
+
54
+ st.markdown("- **L63** β€” Lorenz-63 β€” 3-variable chaotic attractor; learn 2 parameters, strongly nonlinear.")
55
+
56
+ st.markdown("- **L96** β€” Lorenz-96 (40-variable); learn 1-parameter constant forcing.")
57
+ st.image(
58
+ str(_media / "posterior_ribbons_const-force_12_1_k3.png"),
59
+ caption="Example prior-posterior & truth. L: Difference to true parameter. C: parameter-induced forcing of the L96 system. R: data-sample/output predictived distribution ([1:40] state-mean [41:80] state-std)",
60
+ width=1200,
61
+ )
62
+
63
+ st.markdown("- **L96_SPATIAL_FORCING** β€” Lorenz-96 (40-variable) with spatially-varying forcing; learn 40 parameters; moderately correlated prior.")
64
+ st.image(
65
+ str(_media / "posterior_ribbons_vec-force_65_1_k3.png"),
66
+ caption="Example prior-posterior & truth. L: Difference to true parameters. C: parameter-induced forcing of the L96 system. R: data-sample/output predictived distribution ([1:40] state-mean [41:80] state-std)",
67
+ width=1200,
68
+ )
69
+
70
+
71
+ st.markdown("- **L96_NN_FORCING** β€” Lorenz-96 (100-variable) with a neural-network forcing; Learn 61 parameters (weights and biases of the network). Reasonable prior given.")
72
+ st.image(
73
+ str(_media / "posterior_ribbons_flux-force_80_1_k3.png"),
74
+ caption="Example prior-posterior & truth. L: Difference to true parameters (weights). C: parameter-induced forcing of the L96 system. R: data-sample/output predictived distribution ([1:100] state-mean [101:200] state-std)",
75
+ width=1200,
76
+ )
77
 
78
  st.subheader("Method families")
79
  st.markdown(