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