Daniel@0: Daniel@0: Daniel@0: Daniel@0: Netlab Reference Manual scg Daniel@0: Daniel@0: Daniel@0: Daniel@0:

scg Daniel@0:

Daniel@0:

Daniel@0: Purpose Daniel@0:

Daniel@0: Scaled conjugate gradient optimization. Daniel@0: Daniel@0:

Daniel@0: Description Daniel@0:

Daniel@0: [x, options] = scg(f, x, options, gradf) uses a scaled conjugate Daniel@0: gradients Daniel@0: algorithm to find a local minimum of the function f(x) whose Daniel@0: gradient is given by gradf(x). Here x is a row vector Daniel@0: and f returns a scalar value. Daniel@0: The point at which f has a local minimum Daniel@0: is returned as x. The function value at that point is returned Daniel@0: in options(8). Daniel@0: Daniel@0:

[x, options, flog, pointlog, scalelog] = scg(f, x, options, gradf) Daniel@0: also returns (optionally) a log of the function values Daniel@0: after each cycle in flog, a log Daniel@0: of the points visited in pointlog, and a log of the scale values Daniel@0: in the algorithm in scalelog. Daniel@0: Daniel@0:

scg(f, x, options, gradf, p1, p2, ...) allows Daniel@0: additional arguments to be passed to f() and gradf(). Daniel@0: Daniel@0: The optional parameters have the following interpretations. Daniel@0: Daniel@0:

options(1) is set to 1 to display error values; also logs error Daniel@0: values in the return argument errlog, and the points visited Daniel@0: in the return argument pointslog. If options(1) is set to 0, Daniel@0: then only warning messages are displayed. If options(1) is -1, Daniel@0: then nothing is displayed. Daniel@0: Daniel@0:

options(2) is a measure of the absolute precision required for the value Daniel@0: of x at the solution. If the absolute difference between Daniel@0: the values of x between two successive steps is less than Daniel@0: options(2), then this condition is satisfied. Daniel@0: Daniel@0:

options(3) is a measure of the precision required of the objective Daniel@0: function at the solution. If the absolute difference between the Daniel@0: objective function values between two successive steps is less than Daniel@0: options(3), then this condition is satisfied. Daniel@0: Both this and the previous condition must be Daniel@0: satisfied for termination. Daniel@0: Daniel@0:

options(9) is set to 1 to check the user defined gradient function. Daniel@0: Daniel@0:

options(10) returns the total number of function evaluations (including Daniel@0: those in any line searches). Daniel@0: Daniel@0:

options(11) returns the total number of gradient evaluations. Daniel@0: Daniel@0:

options(14) is the maximum number of iterations; default 100. Daniel@0: Daniel@0:

Daniel@0: Examples Daniel@0:

Daniel@0: An example of Daniel@0: the use of the additional arguments is the minimization of an error Daniel@0: function for a neural network: Daniel@0:
Daniel@0: 
Daniel@0: w = scg('neterr', w, options, 'netgrad', net, x, t);
Daniel@0: 
Daniel@0: Daniel@0: Daniel@0:

Daniel@0: Algorithm Daniel@0:

Daniel@0: The search direction is re-started after every nparams Daniel@0: successful weight updates where nparams is the total number of Daniel@0: parameters in x. The algorithm is based on that given by Williams Daniel@0: (1991), with a simplified procedure for updating lambda when Daniel@0: rho < 0.25. Daniel@0: Daniel@0:

Daniel@0: See Also Daniel@0:

Daniel@0: conjgrad, quasinew
Daniel@0: Pages: Daniel@0: Index Daniel@0:
Daniel@0:

Copyright (c) Ian T Nabney (1996-9) Daniel@0: Daniel@0: Daniel@0: Daniel@0: