Skip to main content
. Author manuscript; available in PMC: 2017 Dec 21.
Published in final edited form as: Phys Med Biol. 2016 Nov 23;61(24):8699–8719. doi: 10.1088/1361-6560/61/24/8699

Table 1.

Pseudo-codes for gradient descent method with adaptive step lengths.

Setting αk,1, αmax, c1, c2 and lmax;
Initializing αk,0 = 0, l = 1;
repeat
  if ϕ (αk,l) > ϕ 0 + c1αk,lϕ′ (0) or [ϕ(αk,l) ≥ ϕ(αk,l−1) and l > 1]
    Choose the αk,* with dichotomy within (αk,l−1, αk,l) to fulfil the conditions (13) and (15), then break;
  elseif |ϕ′(αk,l)| ≤ −c2ϕ′(0)
    αk,* = αk,l, then break;
  elseif ϕ′(αk,l) ≥ 0
    Choose the αk,* with dichotomy within (αk,l−1, αk,l) to fulfil the conditions (13) and (15), then break;
  else
    αk,l+1 = αk,l * 1.1;
    l + +;
    If l > lmax or αk,l > αmax
      error(‘Initial step length is not suitable!’)
    end
  end
end(repeat)