trying to increase free memory
This commit is contained in:
@@ -460,7 +460,8 @@
|
||||
"from SymptomsCausedByVaccines.PrrSeriesTransformer import PrrSeriesTransformer\n",
|
||||
"from SymptomsCausedByVaccines.ProportionalReportingRatiosPersister import saveProportionalReportingRatios\n",
|
||||
"import os\n",
|
||||
"import pandas as pd"
|
||||
"import pandas as pd\n",
|
||||
"import gc"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -471,7 +472,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"prrByVaccineAndSymptom = pd.read_csv(\n",
|
||||
" 'data/prrByDrugAndSymptom-EudraVigilance-10.csv',\n",
|
||||
" 'data/prrByDrugAndSymptom-EudraVigilance.csv',\n",
|
||||
" index_col = 'DRUG')\n",
|
||||
"prrByVaccineAndSymptom"
|
||||
]
|
||||
@@ -487,50 +488,6 @@
|
||||
"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",
|
||||
"execution_count": null,
|
||||
@@ -548,9 +505,18 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"prrByVaccineBySymptom = PrrSeriesFactory.getPrrByVaccineBySymptom(prrByVaccineAndSymptom)\n",
|
||||
"\n",
|
||||
"prrByVaccineBySymptomWithoutZeroPrrs = PrrSeriesTransformer.filterByNonZeroPrrs(prrByVaccineBySymptom)\n",
|
||||
"del prrByVaccineBySymptom\n",
|
||||
"gc.collect()\n",
|
||||
"\n",
|
||||
"saveProportionalReportingRatios(\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": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"prrBySymptomByVaccine = PrrSeriesFactory.getPrrBySymptomByVaccine(prrByVaccineAndSymptom)\n",
|
||||
"prrBySymptomByVaccineWithHighPrrs = PrrSeriesTransformer.filterPrrs(prrBySymptomByVaccine, lambda prr: prr >= 2)\n",
|
||||
"del prrBySymptomByVaccine\n",
|
||||
"gc.collect()\n",
|
||||
"\n",
|
||||
"saveProportionalReportingRatios(\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