comparison toolboxes/FullBNT-1.0.7/nethelp3.3/glmhess.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 glmhess
5 </title>
6 </head>
7 <body>
8 <H1> glmhess
9 </H1>
10 <h2>
11 Purpose
12 </h2>
13 Evaluate the Hessian matrix for a generalised linear model.
14
15 <p><h2>
16 Synopsis
17 </h2>
18 <PRE>
19 h = glmhess(net, x, t)
20 [h, hdata] = glmhess(net, x, t)
21 h = glmhess(net, x, t, hdata)
22 </PRE>
23
24
25 <p><h2>
26 Description
27 </h2>
28 <CODE>h = glmhess(net, x, t)</CODE> takes a GLM network data structure <CODE>net</CODE>,
29 a matrix <CODE>x</CODE> of input values, and a matrix <CODE>t</CODE> of target
30 values and returns the full Hessian matrix <CODE>h</CODE> corresponding to
31 the second derivatives of the negative log posterior distribution,
32 evaluated for the current weight and bias values as defined by
33 <CODE>net</CODE>. Note that the target data is not required in the calculation,
34 but is included to make the interface uniform with <CODE>nethess</CODE>. For
35 linear and logistic outputs, the computation is very simple and is
36 done (in effect) in one line in <CODE>glmtrain</CODE>.
37
38 <p><CODE>[h, hdata] = glmhess(net, x, t)</CODE> returns both the Hessian matrix
39 <CODE>h</CODE> and the contribution <CODE>hdata</CODE> arising from the data dependent
40 term in the Hessian.
41
42 <p><CODE>h = glmhess(net, x, t, hdata)</CODE> takes a network data structure
43 <CODE>net</CODE>, a matrix <CODE>x</CODE> of input values, and a matrix <CODE>t</CODE> of
44 target values, together with the contribution <CODE>hdata</CODE> arising from
45 the data dependent term in the Hessian, and returns the full Hessian
46 matrix <CODE>h</CODE> corresponding to the second derivatives of the negative
47 log posterior distribution. This version saves computation time if
48 <CODE>hdata</CODE> has already been evaluated for the current weight and bias
49 values.
50
51 <p><h2>
52 Example
53 </h2>
54 The Hessian matrix is used by <CODE>glmtrain</CODE> to take a Newton step for
55 softmax outputs.
56 <PRE>
57
58 Hessian = glmhess(net, x, t);
59 deltaw = -gradient*pinv(Hessian);
60 </PRE>
61
62
63 <p><h2>
64 See Also
65 </h2>
66 <CODE><a href="glm.htm">glm</a></CODE>, <CODE><a href="glmtrain.htm">glmtrain</a></CODE>, <CODE><a href="hesschek.htm">hesschek</a></CODE>, <CODE><a href="nethess.htm">nethess</a></CODE><hr>
67 <b>Pages:</b>
68 <a href="index.htm">Index</a>
69 <hr>
70 <p>Copyright (c) Ian T Nabney (1996-9)
71
72
73 </body>
74 </html>