Skip to content

Commit

Permalink
Merge pull request #259 from nanglo123/fix_typo_benchmark_dkg
Browse files Browse the repository at this point in the history
Fix awkward wording and typo in cells summarizing results of comparing all covid model comparisons for benchmarking dkg
  • Loading branch information
bgyori authored Dec 1, 2023
2 parents 9dc68c1 + a3f684b commit 43ff471
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions notebooks/hackathon_2023.10/All Covid Model Comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Comparing model templates: 22791it [00:00, 116568.83it/s]\n",
"Comparing model concepts: 14196it [00:00, 211851.47it/s]\n"
"Comparing model templates: 22791it [00:00, 131273.96it/s]\n",
"Comparing model concepts: 14196it [00:00, 255607.96it/s]\n"
]
}
],
Expand Down Expand Up @@ -118,8 +118,8 @@
"name": "stderr",
"output_type": "stream",
"text": [
"Comparing model templates: 22791it [00:00, 158727.26it/s]\n",
"Comparing model concepts: 14196it [00:00, 311479.07it/s]\n"
"Comparing model templates: 22791it [00:00, 143590.10it/s]\n",
"Comparing model concepts: 14196it [00:00, 302254.58it/s]\n"
]
}
],
Expand All @@ -146,59 +146,58 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Out of 276 pairs of models, 242 or 0.88% of pairs have different similarity scores when using the Domain Knowledge Graph\n"
"Removing groundings led to a decrease in pairwise similarity scores for 231 or 0.84% of the 276 pairwise model comparisons.\n"
]
}
],
"source": [
"diff_count = 0 \n",
"after_sim_lower_count = 0\n",
"after_sim_higher_count = 0\n",
"after_sim_same = 0 \n",
"for model_comparison in list_of_both:\n",
" if model_comparison['sim_dkg'] != model_comparison['sim_no_dkg']:\n",
" diff_count += 1\n",
" if model_comparison['sim_no_dkg'] < model_comparison['sim_dkg']:\n",
" after_sim_lower_count += 1\n",
" elif model_comparison['sim_no_dkg'] > model_comparison['sim_dkg']:\n",
" after_sim_higher_count += 1\n",
" print(model_comparison)\n",
" elif model_comparison['sim_no_dkg'] == model_comparison['sim_dkg']:\n",
" after_sim_same += 1\n",
"print(f\"Out of {len(list_of_both)} pairs of models, {diff_count} or {round(diff_count/len(list_of_both),2)}% of pairs have different similarity scores when using the Domain Knowledge Graph\")"
"print(f\"Removing groundings led to a decrease in pairwise similarity scores for {after_sim_lower_count} or {round(after_sim_lower_count /len(list_of_both),2)}% of the {len(list_of_both)} pairwise model comparisons.\")"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "373cc2fe-88e0-4577-a4b7-ce009a9e30fc",
"id": "abe29402-b3e3-407a-969c-b23925139a07",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Out of 276 pairs of models, 34 or 0.12% of the pairwise model similarity scores have not changed after removing grounding\n"
"Removing groundings led to an increase in pairwise similarity scores for 11 or 0.04% of the 276 pairwise model comparisons.\n"
]
}
],
"source": [
"print(f\"Out of 276 pairs of models, {after_sim_same} or {round(after_sim_same/len(list_of_both),2)}% of the pairwise model similarity scores have not changed after removing grounding\")"
"print(f\"Removing groundings led to an increase in pairwise similarity scores for {after_sim_higher_count} or {round(after_sim_higher_count/len(list_of_both),2)}% of the 276 pairwise model comparisons.\")"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "abe29402-b3e3-407a-969c-b23925139a07",
"id": "766431b2-74c6-4e10-86c6-923366e7664b",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Out of 276 pairs of models, 0 or 0.0% of the pairwise model similarity scores have not increased after removing grounding\n"
"Removing groundings led to no change in pairwise similarity scores for 34 or 0.12% of the 276 pairwise model comparisons.\n"
]
}
],
"source": [
"print(f\"Out of 276 pairs of models, {after_sim_higher_count} or {round(after_sim_higher_count/len(list_of_both),2)}% of the pairwise model similarity scores have not increased after removing grounding\")"
"print(f\"Removing groundings led to no change in pairwise similarity scores for {after_sim_same} or {round(after_sim_same/len(list_of_both),2)}% of the {len(list_of_both)} pairwise model comparisons.\")"
]
}
],
Expand Down

0 comments on commit 43ff471

Please sign in to comment.