trying to increase free memory
This commit is contained in:
@@ -460,7 +460,8 @@
|
|||||||
"from SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n",
|
"from SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n",
|
||||||
"from SymptomsCausedByVaccines.ProportionalReportingRatiosPersister import saveProportionalReportingRatios\n",
|
"from SymptomsCausedByVaccines.ProportionalReportingRatiosPersister import saveProportionalReportingRatios\n",
|
||||||
"import os\n",
|
"import os\n",
|
||||||
"import pandas as pd"
|
"import pandas as pd\n",
|
||||||
|
"import gc"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -471,7 +472,7 @@
|
|||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
"prrByVaccineAndSymptom = pd.read_csv(\n",
|
"prrByVaccineAndSymptom = pd.read_csv(\n",
|
||||||
" 'data/prrByDrugAndSymptom-EudraVigilance-10.csv',\n",
|
" 'data/prrByDrugAndSymptom-EudraVigilance.csv',\n",
|
||||||
" index_col = 'DRUG')\n",
|
" index_col = 'DRUG')\n",
|
||||||
"prrByVaccineAndSymptom"
|
"prrByVaccineAndSymptom"
|
||||||
]
|
]
|
||||||
@@ -487,50 +488,6 @@
|
|||||||
"prrByVaccineAndSymptom"
|
"prrByVaccineAndSymptom"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "588aaa2b",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"prrByVaccineBySymptom = PrrSeriesFactory.getPrrByVaccineBySymptom(prrByVaccineAndSymptom)\n",
|
|
||||||
"prrByVaccineBySymptom"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "379d9730",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"prrBySymptomByVaccine = PrrSeriesFactory.getPrrBySymptomByVaccine(prrByVaccineAndSymptom)\n",
|
|
||||||
"prrBySymptomByVaccine"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "0cfd4c66",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"prrByVaccineBySymptomWithoutZeroPrrs = PrrSeriesTransformer.filterByNonZeroPrrs(prrByVaccineBySymptom)\n",
|
|
||||||
"prrByVaccineBySymptomWithoutZeroPrrs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cell_type": "code",
|
|
||||||
"execution_count": null,
|
|
||||||
"id": "86da9cb7",
|
|
||||||
"metadata": {},
|
|
||||||
"outputs": [],
|
|
||||||
"source": [
|
|
||||||
"prrBySymptomByVaccineWithHighPrrs = PrrSeriesTransformer.filterPrrs(prrBySymptomByVaccine, lambda prr: prr >= 2)\n",
|
|
||||||
"prrBySymptomByVaccineWithHighPrrs"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"cell_type": "code",
|
"cell_type": "code",
|
||||||
"execution_count": null,
|
"execution_count": null,
|
||||||
@@ -548,9 +505,18 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
"prrByVaccineBySymptom = PrrSeriesFactory.getPrrByVaccineBySymptom(prrByVaccineAndSymptom)\n",
|
||||||
|
"\n",
|
||||||
|
"prrByVaccineBySymptomWithoutZeroPrrs = PrrSeriesTransformer.filterByNonZeroPrrs(prrByVaccineBySymptom)\n",
|
||||||
|
"del prrByVaccineBySymptom\n",
|
||||||
|
"gc.collect()\n",
|
||||||
|
"\n",
|
||||||
"saveProportionalReportingRatios(\n",
|
"saveProportionalReportingRatios(\n",
|
||||||
" prrByVaccineBySymptomWithoutZeroPrrs,\n",
|
" prrByVaccineBySymptomWithoutZeroPrrs,\n",
|
||||||
" directory = os.path.normpath(webAppBaseDir + '/data/ProportionalReportingRatios/symptoms'))"
|
" directory = os.path.normpath(webAppBaseDir + '/data/ProportionalReportingRatios/symptoms'))\n",
|
||||||
|
"\n",
|
||||||
|
"del prrByVaccineBySymptomWithoutZeroPrrs\n",
|
||||||
|
"gc.collect()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -560,9 +526,17 @@
|
|||||||
"metadata": {},
|
"metadata": {},
|
||||||
"outputs": [],
|
"outputs": [],
|
||||||
"source": [
|
"source": [
|
||||||
|
"prrBySymptomByVaccine = PrrSeriesFactory.getPrrBySymptomByVaccine(prrByVaccineAndSymptom)\n",
|
||||||
|
"prrBySymptomByVaccineWithHighPrrs = PrrSeriesTransformer.filterPrrs(prrBySymptomByVaccine, lambda prr: prr >= 2)\n",
|
||||||
|
"del prrBySymptomByVaccine\n",
|
||||||
|
"gc.collect()\n",
|
||||||
|
"\n",
|
||||||
"saveProportionalReportingRatios(\n",
|
"saveProportionalReportingRatios(\n",
|
||||||
" prrBySymptomByVaccineWithHighPrrs,\n",
|
" prrBySymptomByVaccineWithHighPrrs,\n",
|
||||||
" directory = os.path.normpath(webAppBaseDir + '/data/ProportionalReportingRatios/vaccines'))"
|
" directory = os.path.normpath(webAppBaseDir + '/data/ProportionalReportingRatios/vaccines'))\n",
|
||||||
|
"\n",
|
||||||
|
"del prrBySymptomByVaccineWithHighPrrs\n",
|
||||||
|
"gc.collect()"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user