No early stopping if still bad

This commit is contained in:
Dominik Moritz Roth 2021-09-26 23:18:21 +02:00
parent 1303f302d3
commit 8964fa2c6a

View File

@ -835,7 +835,7 @@ def train(gamma = 1, full=True):
best_mse = mse
stagLen = 0
while gamma > 1.0e-06 and delta > 1.0e-06:
while gamma > 1.0e-06 and delta > 1.0e-06 or best_mse > 3:
last_mse = mse
print({'mse': mse, 'gamma': gamma, 'delta': delta})
delta = sum(gradient[g]**2 for g in gradient)