added proper linebeak for SCG printing

This commit is contained in:
Max Zwiessele 2013-05-16 14:07:44 +01:00
parent 8cd31a83d6
commit 7bbc5cbcde

View file

@ -130,7 +130,8 @@ def SCG(f, gradf, x, optargs=(), maxiters=500, max_f_eval=500, display=True, xto
# If the gradient is zero then we are done.
if current_grad <= gtol:
status = 'converged'
return x, flog, function_eval, status
break
# return x, flog, function_eval, status
# Adjust beta according to comparison ratio.
if Delta < 0.25:
@ -147,9 +148,10 @@ def SCG(f, gradf, x, optargs=(), maxiters=500, max_f_eval=500, display=True, xto
elif success:
gamma = np.dot(gradold - gradnew, gradnew) / (mu)
d = gamma * d - gradnew
else:
# If we get here, then we haven't terminated in the given number of
# iterations.
status = "maxiter exceeded"
# If we get here, then we haven't terminated in the given number of
# iterations.
status = "maxiter exceeded"
print ""
return x, flog, function_eval, status