adding SymptomCombinationsProviderTest
This commit is contained in:
@@ -665,6 +665,7 @@
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from SymptomsCausedByVaccines.MultiLineFitting.MultiLineFitter import MultiLineFitter\n",
|
||||
"from SymptomsCausedByVaccines.MultiLineFitting.SymptomCombinationsProvider import SymptomCombinationsProvider\n",
|
||||
"import numpy as np\n",
|
||||
"from matplotlib import pyplot as plt\n",
|
||||
"from skspatial.objects import Line\n"
|
||||
@@ -676,8 +677,8 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"symptomX = 'Immunosuppression' # HIV test' # 'Immunosuppression'\n",
|
||||
"symptomY = 'Pneumonia' # 'Infection' # 'Immunoglobulin therapy'"
|
||||
"symptomX = 'Abdominal abscess' # HIV test' # 'Immunosuppression'\n",
|
||||
"symptomY = 'Abdominal discomfort' # 'Infection' # 'Immunoglobulin therapy'"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -691,6 +692,27 @@
|
||||
"df"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"symptomCombinations = SymptomCombinationsProvider.generateSymptomCombinations(\n",
|
||||
" prrByLotAndSymptom[prrByLotAndSymptom.columns[:500]],\n",
|
||||
" dataFramePredicate = lambda df: 30 <= len(df) <= 35)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"for symptomCombination in symptomCombinations:\n",
|
||||
" print(list(symptomCombination.columns))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -745,7 +767,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"draw(points, clustersAscending, linesAscending, symptomX, symptomY, minClusterSize = 3)"
|
||||
"draw(points, clustersAscending, linesAscending, symptomX, symptomY, minClusterSize = 2)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -754,7 +776,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"clusters, lines = MultiLineFitter.fitPointsByLines(points, consensusThreshold = 0.001)"
|
||||
"clusters, lines = MultiLineFitter.fitPointsByLines(points, consensusThreshold = 0.1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -763,7 +785,7 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"draw(points, clusters, lines, symptomX, symptomY, minClusterSize = 3)"
|
||||
"draw(points, clusters, lines, symptomX, symptomY, minClusterSize = 5)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user