mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-05-15 06:52:39 +02:00
minor printing improvements
This commit is contained in:
parent
29746cd8be
commit
96829862cc
1 changed files with 10 additions and 5 deletions
|
|
@ -129,12 +129,17 @@ def SCG(f, gradf, x, optargs=(), maxiters=500, max_f_eval=500, display=True, xto
|
||||||
|
|
||||||
iteration += 1
|
iteration += 1
|
||||||
if display:
|
if display:
|
||||||
n_exps = exponents(fnow, current_grad)
|
|
||||||
if iteration - p_iter >= 6 and ((iteration >= p_iter * 2.78) or np.any(n_exps < exps)):
|
|
||||||
exps = n_exps
|
|
||||||
p_iter = iteration
|
|
||||||
print ''
|
|
||||||
print_out(len_maxiters, fnow, current_grad, beta, iteration)
|
print_out(len_maxiters, fnow, current_grad, beta, iteration)
|
||||||
|
n_exps = exponents(fnow, current_grad)
|
||||||
|
if iteration - p_iter >= 6:
|
||||||
|
a = iteration >= p_iter * 2.78
|
||||||
|
b = np.any(n_exps < exps)
|
||||||
|
if a or b:
|
||||||
|
print ''
|
||||||
|
if a:
|
||||||
|
p_iter = iteration
|
||||||
|
if b:
|
||||||
|
exps = n_exps
|
||||||
|
|
||||||
if success:
|
if success:
|
||||||
# Test for termination
|
# Test for termination
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue