mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-18 13:55:14 +02:00
added proper linebeak for SCG printing
This commit is contained in:
parent
8cd31a83d6
commit
7bbc5cbcde
1 changed files with 7 additions and 5 deletions
|
|
@ -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 the gradient is zero then we are done.
|
||||||
if current_grad <= gtol:
|
if current_grad <= gtol:
|
||||||
status = 'converged'
|
status = 'converged'
|
||||||
return x, flog, function_eval, status
|
break
|
||||||
|
# return x, flog, function_eval, status
|
||||||
|
|
||||||
# Adjust beta according to comparison ratio.
|
# Adjust beta according to comparison ratio.
|
||||||
if Delta < 0.25:
|
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:
|
elif success:
|
||||||
gamma = np.dot(gradold - gradnew, gradnew) / (mu)
|
gamma = np.dot(gradold - gradnew, gradnew) / (mu)
|
||||||
d = gamma * d - gradnew
|
d = gamma * d - gradnew
|
||||||
|
else:
|
||||||
# If we get here, then we haven't terminated in the given number of
|
# If we get here, then we haven't terminated in the given number of
|
||||||
# iterations.
|
# iterations.
|
||||||
status = "maxiter exceeded"
|
status = "maxiter exceeded"
|
||||||
|
|
||||||
|
print ""
|
||||||
return x, flog, function_eval, status
|
return x, flog, function_eval, status
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue