This commit is contained in:
Mario Bourgoin 2019-05-14 12:43:56 +00:00
Родитель 15842f0f16
Коммит 3e10dd822b
1 изменённых файлов: 5 добавлений и 5 удалений

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

@ -247,14 +247,14 @@
"\n",
" # Report the number of test duplicates whose matching questions ended up\n",
" # with one of each duplicate's top args.rank scores.\n",
" gain_name = \"gain\"\n",
" metric_name = \"recall\"\n",
" for i in range(1, args.rank+1):\n",
" print('{}@{} = {:.2%}'\n",
" .format(gain_name, i, (test_rank <= i).mean()))\n",
" .format(metric_name, i, (test_rank <= i).mean()))\n",
" \n",
" # Log the gain@rank\n",
" gain = (test_rank <= args.rank).mean()\n",
" run.log(gain_name + \"@\" + str(args.rank), gain)\n",
" # Log the recall@rank\n",
" recall = (test_rank <= args.rank).mean()\n",
" run.log(\"{}@{}\".format(metric_name, args.rank), recall)\n",
" \n",
" # Log the mean rank\n",
" mean_rank_name = 'mean rank'\n",