From 92f60dceeb6d3ad05361254c47967021499ae3b4 Mon Sep 17 00:00:00 2001 From: Francois Grolleau Date: Tue, 27 Aug 2024 22:48:35 -0700 Subject: [PATCH] update pilot ui --- scripts/DevWorkshop/ROC-power/shinyapp/basic-app/app.py | 2 +- .../DevWorkshop/ROC-power/shinyapp/pilot/three_panel_pilot.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/DevWorkshop/ROC-power/shinyapp/basic-app/app.py b/scripts/DevWorkshop/ROC-power/shinyapp/basic-app/app.py index f8e3511c..5177a97a 100644 --- a/scripts/DevWorkshop/ROC-power/shinyapp/basic-app/app.py +++ b/scripts/DevWorkshop/ROC-power/shinyapp/basic-app/app.py @@ -7,7 +7,7 @@ ui.h4("Specifying parameters of two joint distributions"), ui.br(), ui.h4("- Inputs"), - "In the absence of a pilot test set, please manually specify a distribution for the evaluation population, which will be illustrated in real-time in the contour plots below.", + "In the absence of a pilot test set, you need to manually specify a distribution for the evaluation population (illustrated in real-time in the contour plots below.)", ui.p("Once this distribution is specified, use ", ui.em("Run the simulations.")), ui.row( ui.column( diff --git a/scripts/DevWorkshop/ROC-power/shinyapp/pilot/three_panel_pilot.py b/scripts/DevWorkshop/ROC-power/shinyapp/pilot/three_panel_pilot.py index c3d5beff..4a643970 100644 --- a/scripts/DevWorkshop/ROC-power/shinyapp/pilot/three_panel_pilot.py +++ b/scripts/DevWorkshop/ROC-power/shinyapp/pilot/three_panel_pilot.py @@ -112,9 +112,9 @@ def three_panel_pilot(data, # Add a title if change_prev: - plt.title(f'Assuming the distribution from the provided pilot test set with a prevalence of {100*prev:.0f}%,\n the true AUROCs are {auc_A:.2f} for Model A and {auc_B:.2f} for Model B,\nand based on {n_sim} simulations, the estimated power to detect a difference in AUROC is:', fontsize=14, y=1.15) + plt.title(f'Assuming the distribution from the provided pilot test set with a prevalence\nof {100*prev:.0f}%, the true AUROCs are {auc_A:.2f} for Model A and {auc_B:.2f} for Model B. Based on\n{n_sim} simulations, the estimated power to detect a difference in AUROC is:', fontsize=14, y=1.15) else: - plt.title(f'Assuming the distribution from the provided pilot test set,\n the true AUROCs are {auc_A:.2f} for Model A and {auc_B:.2f} for Model B,\nand based on {n_sim} simulations, the estimated power to detect a difference in AUROC is:', fontsize=14, y=1.15) + plt.title(f'Assuming the distribution from the provided pilot test set,\n the true AUROCs are {auc_A:.2f} for Model A and {auc_B:.2f} for Model B. Based on\n{n_sim} simulations, the estimated power to detect a difference in AUROC is:', fontsize=14, y=1.15) # add power as text plt.text(sample_sizes[0], 1.02, f'Power is {powers[0]*100:.1f}%\nAt n={sample_sizes[0]}', ha='center', va='bottom', transform=plt.gca().get_xaxis_transform())