Skip to content

Commit 8025dd0

Browse files
committed
fix evaluation on testing data
1 parent a1b58f6 commit 8025dd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

RSN4EA.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,7 +937,7 @@
937937
" \n",
938938
"#evaluation on testing data\n",
939939
"print('final results:')\n",
940-
"msg, r = handle_evaluation(i+1, last_mean_loss, valid=False)\n",
940+
"msg, r = handle_evaluation(i+1, last_mean_loss, valid=False, method='average')\n",
941941
"write_to_log(opts.log_file_path, msg)"
942942
]
943943
}
@@ -958,7 +958,7 @@
958958
"name": "python",
959959
"nbconvert_exporter": "python",
960960
"pygments_lexer": "ipython3",
961-
"version": "3.6.1"
961+
"version": "3.7.3"
962962
}
963963
},
964964
"nbformat": 4,

RSN4KGC.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,7 @@
10551055
" break\n",
10561056
" \n",
10571057
"#evaluation on testing data\n",
1058-
"r = eval_entity_prediction(model, data=test_data, filter_mat=filter_mat)\n",
1058+
"r = eval_entity_prediction(model, data=test_data, filter_mat=filter_mat, method='average')\n",
10591059
"msg = 'epoch:%i, Hits@1:%.3f, Hits@10:%.3f, MRR:%.3f, MR:%.3f, mean_loss:%.3f' % (epoch, r[0],r[1],r[2],r[3], last_mean_loss)\n",
10601060
"print('\\n'+msg)\n",
10611061
"write_to_log(opts.log_file_path, msg)"
@@ -1078,7 +1078,7 @@
10781078
"name": "python",
10791079
"nbconvert_exporter": "python",
10801080
"pygments_lexer": "ipython3",
1081-
"version": "3.6.1"
1081+
"version": "3.7.3"
10821082
}
10831083
},
10841084
"nbformat": 4,

0 commit comments

Comments
 (0)