Faster training (earlier stopping)

This commit is contained in:
Dominik Moritz Roth 2021-12-11 11:52:49 +01:00
parent 1f5dea6aff
commit 81fa6ca4d6
2 changed files with 5 additions and 2 deletions

View File

@ -895,8 +895,11 @@ def train(initGamma, full=True):
delta = sum(gradient[g]**2 for g in gradient)
best_mse = mse
stagLen = 0
goal = 1.0e-0.4
if full:
goal = 1.0e-0.5
while gamma > 3.0e-05 and delta > 5.0e-05 or best_mse > 10:
while gamma > goal and delta > goal or best_mse > 15:
last_mse = mse
print({'mse': mse, 'gamma': gamma, 'delta': delta})
delta = sum(gradient[g]**2 for g in gradient)

View File

@ -1 +1 @@
{"topList": 0.45743192655139997, "recommender": 0.5079140172269819, "author": 1.2111137699117849, "series": 0.06399278731591332, "tag": 0.015332649025594572, "mu": 0.7090073197262562, "sigma": 0.015801805052114225, "se": 0.338754954784782, "bias": 0.16354975767988336}
{"topList": 0.4870016802753567, "recommender": 0.37623112807627973, "author": 1.0799051298943185, "series": 0.03736436708268792, "tag": 0.029505700766269814, "mu": 0.8781114133837735, "sigma": 0.017026142135337922, "se": 0.37040176344373, "bias": 0.202698904597631}