Add results for test.
"outputs": [],
"source": [
"import sys, os\n",
+ "nlp_path = os.path.abspath('../../')\n",
+ "if nlp_path not in sys.path:\n",
+ " sys.path.insert(0, nlp_path)\n",
+ "\n",
+ "import scrapbook as sb\n",
"\n",
"from tempfile import TemporaryDirectory\n",
"\n",
"|xlnet-large-cased|5.15 hrs|0.11 hrs|0.887|0.890|\n",
"|bert-large-cased|4.01 hrs|0.08 hrs|0.867|0.867|"
]
+ },
+ {
+ "cell_type": "code",
+ "execution_count": null,
+ "metadata": {},
+ "outputs": [],
+ "source": [
+ "result_matched_dict = classification_report(dev_df_matched[LABEL_COL], predictions_matched, digits=3, output_dict=True)\n",
+ "result_mismatched_dict = classification_report(dev_df_mismatched[LABEL_COL], predictions_mismatched, digits=3, output_dict=True)\n",
+ "sb.glue(\"matched_precision\", result_matched_dict[\"weighted avg\"][\"precision\"])\n",
+ "sb.glue(\"matched_recall\", result_matched_dict[\"weighted avg\"][\"recall\"])\n",
+ "sb.glue(\"matched_f1\", result_matched_dict[\"weighted avg\"][\"f1-score\"])\n",
+ "sb.glue(\"mismatched_precision\", result_mismatched_dict[\"weighted avg\"][\"precision\"])\n",
+ "sb.glue(\"mismatched_recall\", result_mismatched_dict[\"weighted avg\"][\"recall\"])\n",
+ "sb.glue(\"mismatched_f1\", result_mismatched_dict[\"weighted avg\"][\"f1-score\"])"
+ ]
}
],
"metadata": {
