from pathlib import Path import sys import streamlit as st try: from data_store import load_uq_store, load_uq_budget_store, UQ_TARGET_LEVELS, BENCHMARK_DIMS from common.leaderboard import render_leaderboard except ModuleNotFoundError: sys.path.append(str(Path(__file__).resolve().parents[1])) from data_store import load_uq_store, load_uq_budget_store, UQ_TARGET_LEVELS, BENCHMARK_DIMS from common.leaderboard import render_leaderboard st.set_page_config(page_title="UQ Leaderboard", page_icon="๐ŸŽฏ", layout="wide") # Sidebar navigation st.sidebar.title("Navigation") st.sidebar.page_link("streamlit_app.py", label="Home", icon="๐Ÿ ") st.sidebar.page_link("pages/OptimizationLeaderboard.py", label="Optimization Leaderboard", icon="๐Ÿ“Š") st.sidebar.page_link("pages/UQLeaderboard.py", label="UQ Leaderboard", icon="๐ŸŽฏ") st.sidebar.page_link("pages/MethodDetails.py", label="Methods", icon="๐Ÿ“˜") st.sidebar.page_link("pages/RawData.py", label="Get Data", icon="๐Ÿงพ") st.markdown(r"**UQ target.** Marginal coverage, $\widetilde{S}(q)$ measures the fraction of output dimensions where the true observation $y$ falls below the $q$-quantile of the posterior predictive distribution. This effectively treats each output dimension as an independent trial, so we also whitened the outputs and data by $\Gamma$, Though not notated, we also truncate to retain 99% of the variance:") st.latex(r"\widetilde{S}(q) = \frac{1}{N_y}\sum_{n=1}^{N_y} \mathbb{I}\!\left(\mathrm{cdf}_{\,\Gamma^{-1/2}\mathrm{post}}\!\left(\Gamma^{-1/2}y\right) \leq q\right)") st.markdown(r"A run succeeds when **all three of the target quantiles** $q \in \{0.15, 0.50, 0.85\}$ simultaneously satisfy") st.latex(r"\left|\widetilde{S}(q) - q\right| \leq \alpha_c(q), \qquad \alpha_c(q) = c\sqrt{\frac{q(1-q)}{N_y}}") st.markdown(r"The boundary $\alpha_c(q)$ adapts the race-goal tolerance for different quantiles, as some are easier to estimate than others with finite samples. while $c$ is the target-scaling level that can be selected in the controls below, and $N_y = \dim(\Gamma^{-1/2}y)$ (and after truncation).") render_leaderboard( load_uq_store(), target_col="uq_target", target_label="UQ Target (coverage tolerance scaling)", title="Uncertainty Quantification Leaderboard", state_prefix="uq", default_target=1.5, show_failure_panel=True, show_scoring_modes=False, canonical_target_levels=UQ_TARGET_LEVELS, budget_store=load_uq_budget_store(), benchmark_dims=BENCHMARK_DIMS, )