wolffd@0: wolffd@0: wolffd@0: wolffd@0: Netlab Reference Manual scg wolffd@0: wolffd@0: wolffd@0: wolffd@0:

scg wolffd@0:

wolffd@0:

wolffd@0: Purpose wolffd@0:

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

wolffd@0: Description wolffd@0:

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

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

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

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

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

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

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

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

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

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

wolffd@0: Examples wolffd@0:

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

wolffd@0: Algorithm wolffd@0:

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

wolffd@0: See Also wolffd@0:

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

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