Daniel@0: function [y, extra, invhess] = netevfwd(w, net, x, t, x_test, invhess) Daniel@0: %NETEVFWD Generic forward propagation with evidence for network Daniel@0: % Daniel@0: % Description Daniel@0: % [Y, EXTRA] = NETEVFWD(W, NET, X, T, X_TEST) takes a network data Daniel@0: % structure NET together with the input X and target T training data Daniel@0: % and input test data X_TEST. It returns the normal forward propagation Daniel@0: % through the network Y together with a matrix EXTRA which consists of Daniel@0: % error bars (variance) for a regression problem or moderated outputs Daniel@0: % for a classification problem. Daniel@0: % Daniel@0: % The optional argument (and return value) INVHESS is the inverse of Daniel@0: % the network Hessian computed on the training data inputs and targets. Daniel@0: % Passing it in avoids recomputing it, which can be a significant Daniel@0: % saving for large training sets. Daniel@0: % Daniel@0: % See also Daniel@0: % MLPEVFWD, RBFEVFWD, GLMEVFWD, FEVBAYES Daniel@0: % Daniel@0: Daniel@0: % Copyright (c) Ian T Nabney (1996-2001) Daniel@0: Daniel@0: func = [net.type, 'evfwd']; Daniel@0: net = netunpak(net, w); Daniel@0: if nargin == 5 Daniel@0: [y, extra, invhess] = feval(func, net, x, t, x_test); Daniel@0: else Daniel@0: [y, extra, invhess] = feval(func, net, x, t, x_test, invhess); Daniel@0: end