pclm()

function [out, Elist]=pclm(W,Nit)

Input:

Output:

Implement the preconditioned line minimization algorithm discussed in lecture,

  1. Initialize $W_0$
  2. Evaluate gradient: $g=\nabla_W E(W_n)$
  3. If not first iteration, do ``linmin test'': check $(g \cdot
d)/\sqrt{(g \cdot g) (d \cdot d)}$ for $d$ being the previous search direction
  4. Set search direction: $d=-K(g)$
  5. Evaluate gradient at trial step: $g_t=\nabla_W E(W_n+\alpha_t d)$
  6. Compute estimate of best step: $\alpha=\alpha_t (g \cdot
d)/([g-gt] \cdot d)$
  7. $W_{n+1}=W_n+\alpha d$
  8. Repeat (2-7)
with a function of the above prototype in the file ``pclm.m''.
Hint: You should have to change only a single line of ``lm.m'' to generate ``pclm.m''



Subsections

Tomas Arias 2005-04-15