Daniel@0: Daniel@0: Daniel@0: Daniel@0: Netlab Reference Manual glm Daniel@0: Daniel@0: Daniel@0: Daniel@0:

glm Daniel@0:

Daniel@0:

Daniel@0: Purpose Daniel@0:

Daniel@0: Create a generalized linear model. Daniel@0: Daniel@0:

Daniel@0: Synopsis Daniel@0:

Daniel@0:
Daniel@0: net = glm(nin, nout, func)
Daniel@0: net = glm(nin, nout, func, prior)
Daniel@0: net = glm(nin, nout, func, prior, beta)
Daniel@0: 
Daniel@0: Daniel@0: Daniel@0:

Daniel@0: Description Daniel@0:

Daniel@0: Daniel@0:

net = glm(nin, nout, func) takes the number of inputs Daniel@0: and outputs for a generalized linear model, together Daniel@0: with a string func which specifies the output unit activation function, Daniel@0: and returns a data structure net. The weights are drawn from a zero mean, Daniel@0: isotropic Gaussian, with variance scaled by the fan-in of the Daniel@0: output units. This makes use of the Matlab function Daniel@0: randn and so the seed for the random weight initialization can be Daniel@0: set using randn('state', s) where s is the seed value. The optional Daniel@0: argument alpha sets the inverse variance for the weight Daniel@0: initialization. Daniel@0: Daniel@0:

The fields in net are Daniel@0:

Daniel@0:   type = 'glm'
Daniel@0:   nin = number of inputs
Daniel@0:   nout = number of outputs
Daniel@0:   nwts = total number of weights and biases
Daniel@0:   actfn = string describing the output unit activation function:
Daniel@0:       'linear'
Daniel@0:       'logistic'
Daniel@0:       'softmax'
Daniel@0:   w1 = first-layer weight matrix
Daniel@0:   b1 = first-layer bias vector
Daniel@0: 
Daniel@0: Daniel@0: Daniel@0:

net = glm(nin, nout, func, prior), in which prior is Daniel@0: a scalar, allows the field Daniel@0: net.alpha in the data structure net to be set, corresponding Daniel@0: to a zero-mean isotropic Gaussian prior with inverse variance with Daniel@0: value prior. Alternatively, prior can consist of a data Daniel@0: structure with fields alpha and index, allowing individual Daniel@0: Gaussian priors to be set over groups of weights in the network. Here Daniel@0: alpha is a column vector in which each element corresponds to a Daniel@0: separate group of weights, which need not be mutually exclusive. The Daniel@0: membership of the groups is defined by the matrix index in which Daniel@0: the columns correspond to the elements of alpha. Each column has Daniel@0: one element for each weight in the matrix, in the order defined by the Daniel@0: function glmpak, and each element is 1 or 0 according to whether Daniel@0: the weight is a member of the corresponding group or not. Daniel@0: Daniel@0:

net = glm(nin, nout, func, prior, beta) also sets the Daniel@0: additional field net.beta in the data structure net, where Daniel@0: beta corresponds to the inverse noise variance. Daniel@0: Daniel@0:

Daniel@0: See Also Daniel@0:

Daniel@0: glmpak, glmunpak, glmfwd, glmerr, glmgrad, glmtrain
Daniel@0: Pages: Daniel@0: Index Daniel@0:
Daniel@0:

Copyright (c) Ian T Nabney (1996-9) Daniel@0: Daniel@0: Daniel@0: Daniel@0: