From 8070dc963753142bb86c4ed698d91fd623ed28e7 Mon Sep 17 00:00:00 2001 From: ziejd2 Date: Thu, 28 Sep 2017 15:04:40 -0500 Subject: BNW using Octave instead of Matlab. This version of BNW should perform the same as the original version. The only difference is that it uses Octave instead of Matlab when running BayesNet Toolbox during parameter learning. I am calling this BNW_1.02. It can be accessed at: compbio.uthsc.edu/BNW_1.02 --- sourcecodes/bnt-master/nethelp3.3/conjgrad.htm | 101 +++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 sourcecodes/bnt-master/nethelp3.3/conjgrad.htm (limited to 'sourcecodes/bnt-master/nethelp3.3/conjgrad.htm') diff --git a/sourcecodes/bnt-master/nethelp3.3/conjgrad.htm b/sourcecodes/bnt-master/nethelp3.3/conjgrad.htm new file mode 100644 index 00000000..4a70c330 --- /dev/null +++ b/sourcecodes/bnt-master/nethelp3.3/conjgrad.htm @@ -0,0 +1,101 @@ + + + +Netlab Reference Manual conjgrad + + + +

conjgrad +

+

+Purpose +

+Conjugate gradients optimization. + +

+Description +

+[x, options, flog, pointlog] = conjgrad(f, x, options, gradf) uses a +conjugate gradients +algorithm to find the minimum of the function f(x) whose +gradient is given by gradf(x). Here x is a row vector +and f returns a scalar value. +The point at which f has a local minimum +is returned as x. The function value at that point is returned +in options(8). A log of the function values +after each cycle is (optionally) returned in flog, and a log +of the points visited is (optionally) returned in pointlog. + +

conjgrad(f, x, options, gradf, p1, p2, ...) allows +additional arguments to be passed to f() and gradf(). + +

The optional parameters have the following interpretations. + +

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

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

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

options(9) is set to 1 to check the user defined gradient function. + +

options(10) returns the total number of function evaluations (including +those in any line searches). + +

options(11) returns the total number of gradient evaluations. + +

options(14) is the maximum number of iterations; default 100. + +

options(15) is the precision in parameter space of the line search; +default 1e-4. + +

+Examples +

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

+Algorithm +

+ +The conjugate gradients algorithm constructs search +directions di that are conjugate: i.e. di*H*d(i-1) = 0, +where H is the Hessian matrix. This means that minimising along +di does not undo the effect of minimising along the previous +direction. The Polak-Ribiere formula is used to calculate new search +directions. The Hessian is not calculated, so there is only an +O(W) storage requirement (where W is the number of +parameters). However, relatively accurate line searches must be used +(default is 1e-04). + +

+See Also +

+graddesc, linemin, minbrack, quasinew, scg
+Pages: +Index +
+

Copyright (c) Ian T Nabney (1996-9) + + + + \ No newline at end of file -- cgit 1.4.1