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