annotate toolboxes/FullBNT-1.0.7/nethelp3.3/gradchek.htm @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 <html>
Daniel@0 2 <head>
Daniel@0 3 <title>
Daniel@0 4 Netlab Reference Manual gradchek
Daniel@0 5 </title>
Daniel@0 6 </head>
Daniel@0 7 <body>
Daniel@0 8 <H1> gradchek
Daniel@0 9 </H1>
Daniel@0 10 <h2>
Daniel@0 11 Purpose
Daniel@0 12 </h2>
Daniel@0 13 Checks a user-defined gradient function using finite differences.
Daniel@0 14
Daniel@0 15 <p><h2>
Daniel@0 16 Synopsis
Daniel@0 17 </h2>
Daniel@0 18 <PRE>
Daniel@0 19
Daniel@0 20 gradchek(w, func, grad)
Daniel@0 21 [gradient, delta] = gradchek(w, func, grad)
Daniel@0 22 gradchek(w, func, grad, p1, p2, ...)
Daniel@0 23 </PRE>
Daniel@0 24
Daniel@0 25
Daniel@0 26 <p><h2>
Daniel@0 27 Description
Daniel@0 28 </h2>
Daniel@0 29 This function is intended as a utility for other netlab functions
Daniel@0 30 (particularly optimisation functions) to use. It enables the user
Daniel@0 31 to check whether a gradient calculation has been correctly implmented
Daniel@0 32 for a given function.
Daniel@0 33 <CODE>gradchek(w, func, grad)</CODE> checks how accurate the gradient
Daniel@0 34 <CODE>grad</CODE> of a function <CODE>func</CODE> is at a parameter vector <CODE>x</CODE>.
Daniel@0 35 A central
Daniel@0 36 difference formula with step size 1.0e-6 is used, and the results
Daniel@0 37 for both gradient function and finite difference approximation are
Daniel@0 38 printed.
Daniel@0 39 The optional return value <CODE>gradient</CODE> is the gradient calculated
Daniel@0 40 using the function <CODE>grad</CODE> and the return value <CODE>delta</CODE> is the
Daniel@0 41 difference between the functional and finite difference methods of
Daniel@0 42 calculating the graident.
Daniel@0 43
Daniel@0 44 <p><CODE>gradchek(x, func, grad, p1, p2, ...)</CODE> allows additional arguments
Daniel@0 45 to be passed to <CODE>func</CODE> and <CODE>grad</CODE>.
Daniel@0 46
Daniel@0 47 <p><h2>
Daniel@0 48 See Also
Daniel@0 49 </h2>
Daniel@0 50 <CODE><a href="conjgrad.htm">conjgrad</a></CODE>, <CODE><a href="graddesc.htm">graddesc</a></CODE>, <CODE><a href="hmc.htm">hmc</a></CODE>, <CODE><a href="olgd.htm">olgd</a></CODE>, <CODE><a href="quasinew.htm">quasinew</a></CODE>, <CODE><a href="scg.htm">scg</a></CODE><hr>
Daniel@0 51 <b>Pages:</b>
Daniel@0 52 <a href="index.htm">Index</a>
Daniel@0 53 <hr>
Daniel@0 54 <p>Copyright (c) Ian T Nabney (1996-9)
Daniel@0 55
Daniel@0 56
Daniel@0 57 </body>
Daniel@0 58 </html>