From ef4d452dc078d70b37b648d3fb38498f5e9fe59b Mon Sep 17 00:00:00 2001 From: Xiang Wang Date: Thu, 31 Oct 2019 09:26:04 +0800 Subject: [PATCH] change flag_step from 5 to 10 change flag_step from 5 to 10, ensuring the better performance. --- Model/Main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Model/Main.py b/Model/Main.py index ba58af4..bb2b029 100644 --- a/Model/Main.py +++ b/Model/Main.py @@ -319,9 +319,10 @@ def load_pretrained_data(args): ret['precision'][0], ret['precision'][-1], ret['hit_ratio'][0], ret['hit_ratio'][-1], ret['ndcg'][0], ret['ndcg'][-1]) print(perf_str) - + + # change flag_step from 5 to 10, ensuring the better performance. cur_best_pre_0, stopping_step, should_stop = early_stopping(ret['recall'][0], cur_best_pre_0, - stopping_step, expected_order='acc', flag_step=5) + stopping_step, expected_order='acc', flag_step=10) # ********************************************************* # early stopping when cur_best_pre_0 is decreasing for ten successive steps.