Skip to content

Commit

Permalink
Merge pull request #11 from vin00d/main
Browse files Browse the repository at this point in the history
rel 0.1.2
  • Loading branch information
vin00d authored Apr 2, 2021
2 parents 54fb129 + 632a5bf commit 5bf3be1
Show file tree
Hide file tree
Showing 39 changed files with 4,709 additions and 1,555 deletions.
65 changes: 38 additions & 27 deletions 00_basics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@
"#export\n",
"from fastai.imports import * \n",
"from addict import Dict\n",
"from datetime import date"
"from datetime import date\n",
"from collections import OrderedDict"
]
},
{
Expand Down Expand Up @@ -158,19 +159,22 @@
" \n",
" 'SYNTHEA_DATAGEN_DATES' : \n",
" {\n",
" '1K' : date.today().strftime('%d-%m-%Y'),\n",
" '10K' : date.today().strftime('%d-%m-%Y'),\n",
" '20K' : date.today().strftime('%d-%m-%Y'),\n",
" '100K': date.today().strftime('%d-%m-%Y'),\n",
" '250K': date.today().strftime('%d-%m-%Y')\n",
" '1K' : date.today().strftime('%m-%d-%Y'),\n",
" '10K' : date.today().strftime('%m-%d-%Y'),\n",
" '20K' : date.today().strftime('%m-%d-%Y'),\n",
" '100K': date.today().strftime('%m-%d-%Y'),\n",
" '250K': date.today().strftime('%m-%d-%Y')\n",
" },\n",
" 'CONDITIONS':\n",
" {\n",
" 'diabetes': '44054006||START',\n",
" 'stroke': '230690007||START',\n",
" 'alzheimers': '26929004||START',\n",
" 'coronary_heart': '53741008||START',\n",
" 'lung_cancer': '254637007||START'\n",
" 'diabetes': '44054006',\n",
" 'stroke': '230690007',\n",
" 'alzheimers': '26929004',\n",
" 'coronary_heart': '53741008',\n",
" 'lung_cancer': '254637007',\n",
" 'breast_cancer': '254837009',\n",
" 'rheumatoid_arthritis': '69896004',\n",
" 'epilepsy': '84757009'\n",
" },\n",
" 'LOG_NUMERICALIZE_EXCEP': True\n",
" }\n",
Expand All @@ -196,7 +200,7 @@
" settings = Dict(settings_template())\n",
" Path.mkdir(Path(settings_dir), exist_ok=True)\n",
" with open(settings_file, 'w') as s:\n",
" yaml.dump(settings.to_dict(), s, sort_keys=False)\n",
" yaml.dump(settings.to_dict(), s, sort_keys=False, allow_unicode=True)\n",
" else:\n",
" with open(settings_file, 'r') as s:\n",
" settings = Dict(yaml.full_load(s))\n",
Expand Down Expand Up @@ -255,7 +259,7 @@
"id": "buried-scholarship",
"metadata": {},
"source": [
"- These global variables are used for convenience in many places in the library. They can be over-ridden by passing in different values."
"These are global variables with default used for convenience in many places in the library. They can be over-ridden by passing in non-default values where needed."
]
},
{
Expand All @@ -267,11 +271,14 @@
{
"data": {
"text/plain": [
"{'diabetes': '44054006||START',\n",
" 'stroke': '230690007||START',\n",
" 'alzheimers': '26929004||START',\n",
" 'coronary_heart': '53741008||START',\n",
" 'lung_cancer': '254637007||START'}"
"{'diabetes': '44054006',\n",
" 'stroke': '230690007',\n",
" 'alzheimers': '26929004',\n",
" 'coronary_heart': '53741008',\n",
" 'lung_cancer': '254637007',\n",
" 'breast_cancer': '254837009',\n",
" 'rheumatoid_arthritis': '69896004',\n",
" 'epilepsy': '84757009'}"
]
},
"execution_count": null,
Expand All @@ -288,9 +295,13 @@
"id": "floating-uniform",
"metadata": {},
"source": [
"- These `CONDITIONS` are eventually transformed into **labels** that we will use to train the the deep learning models.\n",
" - The `CONDITIONS` dict is used in pre-processing to identify & label patients with these conditions. \n",
" - The final labels the models train on must be a sub-set of these. "
"- These conditions defined in the `CONDITIONS` dictionary are used during pre-processing to identify & label patients that have these conditions\n",
"- After pre-processing, a subset of these (some or all of them) are used as labels to train the deep learning models\n",
"\n",
"\n",
"- Thus to train on a different set of labels / conditions\n",
" - First pre-process the dataset using the new conditions\n",
" - And then proceed to training the models"
]
},
{
Expand Down Expand Up @@ -355,11 +366,11 @@
{
"data": {
"text/plain": [
"{'1K': '30-03-2021',\n",
" '10K': '30-03-2021',\n",
" '20K': '30-03-2021',\n",
" '100K': '30-03-2021',\n",
" '250K': '30-03-2021'}"
"{'1K': '04-01-2021',\n",
" '10K': '04-01-2021',\n",
" '20K': '04-01-2021',\n",
" '100K': '04-01-2021',\n",
" '250K': '04-01-2021'}"
]
},
"execution_count": null,
Expand Down Expand Up @@ -418,7 +429,7 @@
"id": "median-christian",
"metadata": {},
"source": [
"**Please change these paths to defaults in your specific configuration**\n",
"**Please change these paths to defaults in your specific configuration** if desired\n",
"\n",
"- All of these artifacts need to be in some form of failsafe storage, but not all need to be in version control.\n",
"- Also, some of them are likely to get big and version control might not be the ideal location (e.g. data, logs and models).\n",
Expand Down
Loading

0 comments on commit 5bf3be1

Please sign in to comment.