Update assignment_2.ipynb
Browse files- assignment_2.ipynb +35 -6
assignment_2.ipynb
CHANGED
|
@@ -384,7 +384,6 @@
|
|
| 384 |
"Calculating uncertainty scores...\n",
|
| 385 |
"\n",
|
| 386 |
"========================================\n",
|
| 387 |
-
"✅ Part B Complete! Outputs successfully shown.\n",
|
| 388 |
"File saved to: hitl_green_100_REPRODUCED.csv\n",
|
| 389 |
" - Min Uncertainty: 0.9959\n",
|
| 390 |
" - Max Uncertainty: 1.0000\n",
|
|
@@ -456,7 +455,6 @@
|
|
| 456 |
"df_high_risk[final_columns].to_csv(safe_filename, index=False)\n",
|
| 457 |
"\n",
|
| 458 |
"print(\"\\n\" + \"=\"*40)\n",
|
| 459 |
-
"print(f\"Part B Complete! Outputs successfully shown.\")\n",
|
| 460 |
"print(f\"File saved to: {safe_filename}\")\n",
|
| 461 |
"print(f\" - Min Uncertainty: {df_high_risk['u'].min():.4f}\")\n",
|
| 462 |
"print(f\" - Max Uncertainty: {df_high_risk['u'].max():.4f}\")\n",
|
|
@@ -913,6 +911,39 @@
|
|
| 913 |
"\n",
|
| 914 |
"Done\n"
|
| 915 |
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 916 |
}
|
| 917 |
],
|
| 918 |
"source": [
|
|
@@ -1216,8 +1247,7 @@
|
|
| 1216 |
"Precision | 0.7489 | 0.7473 (-0.0015)\n",
|
| 1217 |
"Recall | 0.7488 | 0.7467 (-0.0021)\n",
|
| 1218 |
"F1-score | 0.7488 | 0.7465 (-0.0023)\n",
|
| 1219 |
-
"============================================================\n"
|
| 1220 |
-
"Assignment Complete! Copy the table above into your README.\n"
|
| 1221 |
]
|
| 1222 |
}
|
| 1223 |
],
|
|
@@ -1284,8 +1314,7 @@
|
|
| 1284 |
" val_d = active_report['macro avg'][m]\n",
|
| 1285 |
" diff = val_d - val_a\n",
|
| 1286 |
" print(f\"{m.capitalize():<15} | {val_a:20.4f} | {val_d:20.4f} ({'+' if diff >=0 else ''}{diff:.4f})\")\n",
|
| 1287 |
-
"print(\"=\"*60)\n"
|
| 1288 |
-
"print(\"Assignment Complete! Copy the table above into your README.\")"
|
| 1289 |
]
|
| 1290 |
},
|
| 1291 |
{
|
|
|
|
| 384 |
"Calculating uncertainty scores...\n",
|
| 385 |
"\n",
|
| 386 |
"========================================\n",
|
|
|
|
| 387 |
"File saved to: hitl_green_100_REPRODUCED.csv\n",
|
| 388 |
" - Min Uncertainty: 0.9959\n",
|
| 389 |
" - Max Uncertainty: 1.0000\n",
|
|
|
|
| 455 |
"df_high_risk[final_columns].to_csv(safe_filename, index=False)\n",
|
| 456 |
"\n",
|
| 457 |
"print(\"\\n\" + \"=\"*40)\n",
|
|
|
|
| 458 |
"print(f\"File saved to: {safe_filename}\")\n",
|
| 459 |
"print(f\" - Min Uncertainty: {df_high_risk['u'].min():.4f}\")\n",
|
| 460 |
"print(f\" - Max Uncertainty: {df_high_risk['u'].max():.4f}\")\n",
|
|
|
|
| 911 |
"\n",
|
| 912 |
"Done\n"
|
| 913 |
]
|
| 914 |
+
},
|
| 915 |
+
{
|
| 916 |
+
"name": "stdout",
|
| 917 |
+
"output_type": "stream",
|
| 918 |
+
"text": [
|
| 919 |
+
"============================================================\n",
|
| 920 |
+
"HITL ANALYSIS REPORT\n",
|
| 921 |
+
"============================================================\n",
|
| 922 |
+
"Total Claims Labeled: 100\n",
|
| 923 |
+
"Human Overrides: 3\n",
|
| 924 |
+
"Agreement Rate: 97.0%\n",
|
| 925 |
+
"------------------------------------------------------------\n",
|
| 926 |
+
"\n",
|
| 927 |
+
" 3 EXAMPLES OF HUMAN OVERRIDES:\n",
|
| 928 |
+
"\n",
|
| 929 |
+
"Example #1:\n",
|
| 930 |
+
" • Claim Snippet: \"1. An apparatus, comprising: a single, dilute solids phase reactor having a top, a central section, and a bottom section with an exit port, and a top ...\"\n",
|
| 931 |
+
" • LLM Suggestion: 0 (Rationale: The claim describes a particle removal apparatus for exhaust gases, which addresses air pollution control rather than greenhouse gas mitigation.)\n",
|
| 932 |
+
" • Human Label: 1\n",
|
| 933 |
+
" • Your Notes: Manual override: This technology is classified as Green under CPC Y02.\n",
|
| 934 |
+
"\n",
|
| 935 |
+
"Example #2:\n",
|
| 936 |
+
" • Claim Snippet: \"1. A biogenic flocculant composition for CEPT sludge conditioning comprising a) a first flocculant component which comprises at least one acidophilic ...\"\n",
|
| 937 |
+
" • LLM Suggestion: 0 (Rationale: The claim focuses on sludge conditioning using microbial flocculants, which is a wastewater treatment application rather than a direct climate‑change mitigation technology.)\n",
|
| 938 |
+
" • Human Label: 1\n",
|
| 939 |
+
" • Your Notes: Manual override: This technology is classified as Green under CPC Y02.\n",
|
| 940 |
+
"\n",
|
| 941 |
+
"Example #3:\n",
|
| 942 |
+
" • Claim Snippet: \"1. A nuclear reactor comprising: an elongated reactor vessel enclosed at a lower end and having an open upper end on which an annular flange is formed...\"\n",
|
| 943 |
+
" • LLM Suggestion: 0 (Rationale: The claim describes a nuclear reactor component, not a climate‑change mitigation technology.)\n",
|
| 944 |
+
" • Human Label: 1\n",
|
| 945 |
+
" • Your Notes: Manual override: This technology is classified as Green under CPC Y02.\n"
|
| 946 |
+
]
|
| 947 |
}
|
| 948 |
],
|
| 949 |
"source": [
|
|
|
|
| 1247 |
"Precision | 0.7489 | 0.7473 (-0.0015)\n",
|
| 1248 |
"Recall | 0.7488 | 0.7467 (-0.0021)\n",
|
| 1249 |
"F1-score | 0.7488 | 0.7465 (-0.0023)\n",
|
| 1250 |
+
"============================================================\n"
|
|
|
|
| 1251 |
]
|
| 1252 |
}
|
| 1253 |
],
|
|
|
|
| 1314 |
" val_d = active_report['macro avg'][m]\n",
|
| 1315 |
" diff = val_d - val_a\n",
|
| 1316 |
" print(f\"{m.capitalize():<15} | {val_a:20.4f} | {val_d:20.4f} ({'+' if diff >=0 else ''}{diff:.4f})\")\n",
|
| 1317 |
+
"print(\"=\"*60)\n"
|
|
|
|
| 1318 |
]
|
| 1319 |
},
|
| 1320 |
{
|