This commit is contained in:
hlums 2019-11-15 03:12:19 +00:00
Родитель 9e0a532568
Коммит 697e0abee3
1 изменённых файлов: 22 добавлений и 1 удалений

Просмотреть файл

@ -60,7 +60,12 @@
"outputs": [],
"source": [
"import sys, os\n",
" \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",
"import numpy as np\n",
@ -384,6 +389,22 @@
"|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": {