wolffd@0
|
1 <html>
|
wolffd@0
|
2 <head>
|
wolffd@0
|
3 <title>
|
wolffd@0
|
4 Netlab Reference Manual glm
|
wolffd@0
|
5 </title>
|
wolffd@0
|
6 </head>
|
wolffd@0
|
7 <body>
|
wolffd@0
|
8 <H1> glm
|
wolffd@0
|
9 </H1>
|
wolffd@0
|
10 <h2>
|
wolffd@0
|
11 Purpose
|
wolffd@0
|
12 </h2>
|
wolffd@0
|
13 Create a generalized linear model.
|
wolffd@0
|
14
|
wolffd@0
|
15 <p><h2>
|
wolffd@0
|
16 Synopsis
|
wolffd@0
|
17 </h2>
|
wolffd@0
|
18 <PRE>
|
wolffd@0
|
19 net = glm(nin, nout, func)
|
wolffd@0
|
20 net = glm(nin, nout, func, prior)
|
wolffd@0
|
21 net = glm(nin, nout, func, prior, beta)
|
wolffd@0
|
22 </PRE>
|
wolffd@0
|
23
|
wolffd@0
|
24
|
wolffd@0
|
25 <p><h2>
|
wolffd@0
|
26 Description
|
wolffd@0
|
27 </h2>
|
wolffd@0
|
28
|
wolffd@0
|
29 <p><CODE>net = glm(nin, nout, func)</CODE> takes the number of inputs
|
wolffd@0
|
30 and outputs for a generalized linear model, together
|
wolffd@0
|
31 with a string <CODE>func</CODE> which specifies the output unit activation function,
|
wolffd@0
|
32 and returns a data structure <CODE>net</CODE>. The weights are drawn from a zero mean,
|
wolffd@0
|
33 isotropic Gaussian, with variance scaled by the fan-in of the
|
wolffd@0
|
34 output units. This makes use of the Matlab function
|
wolffd@0
|
35 <CODE>randn</CODE> and so the seed for the random weight initialization can be
|
wolffd@0
|
36 set using <CODE>randn('state', s)</CODE> where <CODE>s</CODE> is the seed value. The optional
|
wolffd@0
|
37 argument <CODE>alpha</CODE> sets the inverse variance for the weight
|
wolffd@0
|
38 initialization.
|
wolffd@0
|
39
|
wolffd@0
|
40 <p>The fields in <CODE>net</CODE> are
|
wolffd@0
|
41 <PRE>
|
wolffd@0
|
42 type = 'glm'
|
wolffd@0
|
43 nin = number of inputs
|
wolffd@0
|
44 nout = number of outputs
|
wolffd@0
|
45 nwts = total number of weights and biases
|
wolffd@0
|
46 actfn = string describing the output unit activation function:
|
wolffd@0
|
47 'linear'
|
wolffd@0
|
48 'logistic'
|
wolffd@0
|
49 'softmax'
|
wolffd@0
|
50 w1 = first-layer weight matrix
|
wolffd@0
|
51 b1 = first-layer bias vector
|
wolffd@0
|
52 </PRE>
|
wolffd@0
|
53
|
wolffd@0
|
54
|
wolffd@0
|
55 <p><CODE>net = glm(nin, nout, func, prior)</CODE>, in which <CODE>prior</CODE> is
|
wolffd@0
|
56 a scalar, allows the field
|
wolffd@0
|
57 <CODE>net.alpha</CODE> in the data structure <CODE>net</CODE> to be set, corresponding
|
wolffd@0
|
58 to a zero-mean isotropic Gaussian prior with inverse variance with
|
wolffd@0
|
59 value <CODE>prior</CODE>. Alternatively, <CODE>prior</CODE> can consist of a data
|
wolffd@0
|
60 structure with fields <CODE>alpha</CODE> and <CODE>index</CODE>, allowing individual
|
wolffd@0
|
61 Gaussian priors to be set over groups of weights in the network. Here
|
wolffd@0
|
62 <CODE>alpha</CODE> is a column vector in which each element corresponds to a
|
wolffd@0
|
63 separate group of weights, which need not be mutually exclusive. The
|
wolffd@0
|
64 membership of the groups is defined by the matrix <CODE>index</CODE> in which
|
wolffd@0
|
65 the columns correspond to the elements of <CODE>alpha</CODE>. Each column has
|
wolffd@0
|
66 one element for each weight in the matrix, in the order defined by the
|
wolffd@0
|
67 function <CODE>glmpak</CODE>, and each element is 1 or 0 according to whether
|
wolffd@0
|
68 the weight is a member of the corresponding group or not.
|
wolffd@0
|
69
|
wolffd@0
|
70 <p><CODE>net = glm(nin, nout, func, prior, beta)</CODE> also sets the
|
wolffd@0
|
71 additional field <CODE>net.beta</CODE> in the data structure <CODE>net</CODE>, where
|
wolffd@0
|
72 beta corresponds to the inverse noise variance.
|
wolffd@0
|
73
|
wolffd@0
|
74 <p><h2>
|
wolffd@0
|
75 See Also
|
wolffd@0
|
76 </h2>
|
wolffd@0
|
77 <CODE><a href="glmpak.htm">glmpak</a></CODE>, <CODE><a href="glmunpak.htm">glmunpak</a></CODE>, <CODE><a href="glmfwd.htm">glmfwd</a></CODE>, <CODE><a href="glmerr.htm">glmerr</a></CODE>, <CODE><a href="glmgrad.htm">glmgrad</a></CODE>, <CODE><a href="glmtrain.htm">glmtrain</a></CODE><hr>
|
wolffd@0
|
78 <b>Pages:</b>
|
wolffd@0
|
79 <a href="index.htm">Index</a>
|
wolffd@0
|
80 <hr>
|
wolffd@0
|
81 <p>Copyright (c) Ian T Nabney (1996-9)
|
wolffd@0
|
82
|
wolffd@0
|
83
|
wolffd@0
|
84 </body>
|
wolffd@0
|
85 </html> |