Created
March 18, 2022 16:42
-
-
Save annawoodard/77ea59df5b159b4e4914e9b3417a5f6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"id": "c19a848d", | |
"metadata": {}, | |
"source": [ | |
"Below I tabulate the expected number of detected cancers under a range of values for the number of women prospectively consented to have their Mirai score evaluated, `total_consented`; the number of women selected for intensive surveillance, `total_intensive_surveilled`; the cancer incidence in the general UCM breast cancer screening population, `real_cancer_incidence`; and the true positive rate, `tpr` of Mirai. Conservative ranges for Mirai's true positive rate are taken from Yala et. al. [1] table 2 and figure 3.\n", | |
"\n", | |
"[1] [https://pubmed.ncbi.nlm.nih.gov/33504648/](https://pubmed.ncbi.nlm.nih.gov/33504648/)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"id": "4a865fe5", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import tabulate" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"id": "4d96372d", | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"total_consented_options = [\n", | |
" 1000,\n", | |
" 5000,\n", | |
" 10000,\n", | |
"] # number of women we consent to prospectively run Mirai on\n", | |
"real_cancer_incidences = [5 / 1000.0, 10 / 1000.0, 15 / 1000.0]\n", | |
"tprs = [0.2, 0.3, 0.4, 0.5] # true positive rates" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"id": "211ec56b", | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"\n", | |
"\n", | |
"\n", | |
"*****************************************total consented 1000*****************************************\n", | |
" cancer real detected cancers detected cancers detected cancers detected cancers\n", | |
" incidence cancers tpr=0.2 tpr=0.3 tpr=0.4 tpr=0.5\n", | |
"----------- --------- ------------------ ------------------ ------------------ ------------------\n", | |
" 0.005 5 1 1 2 2\n", | |
" 0.01 10 2 3 4 5\n", | |
" 0.015 15 3 4 6 7\n", | |
"\n", | |
"\n", | |
"\n", | |
"*****************************************total consented 5000*****************************************\n", | |
" cancer real detected cancers detected cancers detected cancers detected cancers\n", | |
" incidence cancers tpr=0.2 tpr=0.3 tpr=0.4 tpr=0.5\n", | |
"----------- --------- ------------------ ------------------ ------------------ ------------------\n", | |
" 0.005 25 5 7 10 12\n", | |
" 0.01 50 10 15 20 25\n", | |
" 0.015 75 15 22 30 37\n", | |
"\n", | |
"\n", | |
"\n", | |
"*****************************************total consented 10000*****************************************\n", | |
" cancer real detected cancers detected cancers detected cancers detected cancers\n", | |
" incidence cancers tpr=0.2 tpr=0.3 tpr=0.4 tpr=0.5\n", | |
"----------- --------- ------------------ ------------------ ------------------ ------------------\n", | |
" 0.005 50 10 15 20 25\n", | |
" 0.01 100 20 30 40 50\n", | |
" 0.015 150 30 45 60 75\n" | |
] | |
} | |
], | |
"source": [ | |
"for total_consented in total_consented_options:\n", | |
" print(\n", | |
" \"\\n\\n\\n\"\n", | |
" + \"*\" * 41\n", | |
" + \"total consented {}\".format(total_consented)\n", | |
" + \"*\" * 41\n", | |
" )\n", | |
" table = []\n", | |
" for real_cancer_incidence in real_cancer_incidences:\n", | |
" real_cancers = real_cancer_incidence * total_consented\n", | |
" row = [\"{:>03f}\".format(real_cancer_incidence), real_cancers]\n", | |
" for tpr in tprs:\n", | |
" row += [int(tpr * real_cancers)]\n", | |
" table += [row]\n", | |
" print(\n", | |
" tabulate.tabulate(\n", | |
" table,\n", | |
" [\"cancer\\nincidence\", \"real\\ncancers\"]\n", | |
" + [\"detected cancers\\ntpr={:0.1f}\".format(tpr) for tpr in tprs],\n", | |
" )\n", | |
" )" | |
] | |
} | |
], | |
"metadata": { | |
"gist": { | |
"data": { | |
"description": "stats.ipynb", | |
"public": true | |
}, | |
"id": "" | |
}, | |
"kernelspec": { | |
"display_name": "Python [conda env:maicara] *", | |
"language": "python", | |
"name": "conda-env-maicara-py" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.9.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 5 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment