annotate toolboxes/FullBNT-1.0.7/netlab3.3/netevfwd.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] = netevfwd(w, net, x, t, x_test, invhess)
Daniel@0 2 %NETEVFWD Generic forward propagation with evidence for network
Daniel@0 3 %
Daniel@0 4 % Description
Daniel@0 5 % [Y, EXTRA] = NETEVFWD(W, NET, X, T, X_TEST) takes a network data
Daniel@0 6 % structure NET together with the input X and target T training data
Daniel@0 7 % and input test data X_TEST. It returns the normal forward propagation
Daniel@0 8 % through the network Y together with a matrix EXTRA which consists of
Daniel@0 9 % error bars (variance) for a regression problem or moderated outputs
Daniel@0 10 % for a 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 % MLPEVFWD, RBFEVFWD, GLMEVFWD, FEVBAYES
Daniel@0 19 %
Daniel@0 20
Daniel@0 21 % Copyright (c) Ian T Nabney (1996-2001)
Daniel@0 22
Daniel@0 23 func = [net.type, 'evfwd'];
Daniel@0 24 net = netunpak(net, w);
Daniel@0 25 if nargin == 5
Daniel@0 26 [y, extra, invhess] = feval(func, net, x, t, x_test);
Daniel@0 27 else
Daniel@0 28 [y, extra, invhess] = feval(func, net, x, t, x_test, invhess);
Daniel@0 29 end