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

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