Skip to content

Commit

Permalink
update pilot ui
Browse files Browse the repository at this point in the history
  • Loading branch information
fcgrolleau committed Aug 28, 2024
1 parent 861d1ed commit 92f60dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/DevWorkshop/ROC-power/shinyapp/basic-app/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 92f60dc

Please sign in to comment.