annotate toolboxes/FullBNT-1.0.7/netlab3.3/glmevfwd.m @ 0:cc4b1211e677
tip
initial commit to HG from
Changeset:
646 (e263d8a21543) added further path and more save "camirversion.m"
author |
Daniel Wolff |
date |
Fri, 19 Aug 2016 13:07:06 +0200 |
parents |
|
children |
|
rev |
line source |
Daniel@0
|
1 function [y, extra, invhess] = glmevfwd(net, x, t, x_test, invhess)
|
Daniel@0
|
2 %GLMEVFWD Forward propagation with evidence for GLM
|
Daniel@0
|
3 %
|
Daniel@0
|
4 % Description
|
Daniel@0
|
5 % Y = GLMEVFWD(NET, X, T, X_TEST) takes a network data structure NET
|
Daniel@0
|
6 % together with the input X and target T training data and input test
|
Daniel@0
|
7 % data X_TEST. It returns the normal forward propagation through the
|
Daniel@0
|
8 % network Y together with a matrix EXTRA which consists of error bars
|
Daniel@0
|
9 % (variance) for a regression problem or moderated outputs for a
|
Daniel@0
|
10 % classification problem.
|
Daniel@0
|
11 %
|
Daniel@0
|
12 % The optional argument (and return value) INVHESS is the inverse of
|
Daniel@0
|
13 % the network Hessian computed on the training data inputs and targets.
|
Daniel@0
|
14 % Passing it in avoids recomputing it, which can be a significant
|
Daniel@0
|
15 % saving for large training sets.
|
Daniel@0
|
16 %
|
Daniel@0
|
17 % See also
|
Daniel@0
|
18 % FEVBAYES
|
Daniel@0
|
19 %
|
Daniel@0
|
20
|
Daniel@0
|
21 % Copyright (c) Ian T Nabney (1996-2001)
|
Daniel@0
|
22
|
Daniel@0
|
23 [y, a] = glmfwd(net, x_test);
|
Daniel@0
|
24 if nargin == 4
|
Daniel@0
|
25 [extra, invhess] = fevbayes(net, y, a, x, t, x_test);
|
Daniel@0
|
26 else
|
Daniel@0
|
27 [extra, invhess] = fevbayes(net, y, a, x, t, x_test, invhess);
|
Daniel@0
|
28 end
|