Skip to content

Commit

Permalink
Merge pull request #64 from jvivian/josh_branch
Browse files Browse the repository at this point in the history
Comparative analysis metrics phase one
jvivian authored Mar 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents f4fcfc5 + efddb7d commit dd5a202
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions covid19_drdfm/streamlit/pages/2_Comparative_Run_Analysis.py
Original file line number Diff line number Diff line change
@@ -54,6 +54,20 @@ def create_plot(df):
return metric


def get_summary(df):
# Median metrics
col1, col2, col3 = st.columns(3)
col1.metric("Median Log Likelihood", df["Log Likelihood"].median())
col2.metric("Median AIC", df["AIC"].median())
col3.metric("Median EM Iterations", df["EM Iterations"].median())


def show_summary(df):
run = st.selectbox("Select a run", df["Run"].unique())
filtered_df = df[(df["Run"] == run)]
return get_summary(filtered_df)


def run_normal(df, metric):
# Declare runs as a parameter
with st.form("ABtest"):
@@ -150,6 +164,10 @@ def plot_forest(idata):
# Plot metrics across runs
metric = create_plot(df)

# Metrics by run in column form
with st.expander("Summary"):
show_summary(df)

# Bayesian A/B Testing
_ab_blurb()
idata = run_normal(df, metric)

0 comments on commit dd5a202

Please sign in to comment.