wolffd@0
|
1 function [y, extra, invhess] = rbfevfwd(net, x, t, x_test, invhess)
|
wolffd@0
|
2 %RBFEVFWD Forward propagation with evidence for RBF
|
wolffd@0
|
3 %
|
wolffd@0
|
4 % Description
|
wolffd@0
|
5 % Y = RBFEVFWD(NET, X, T, X_TEST) takes a network data structure NET
|
wolffd@0
|
6 % together with the input X and target T training data and input test
|
wolffd@0
|
7 % data X_TEST. It returns the normal forward propagation through the
|
wolffd@0
|
8 % network Y together with a matrix EXTRA which consists of error bars
|
wolffd@0
|
9 % (variance) for a regression problem or moderated outputs for a
|
wolffd@0
|
10 % classification problem.
|
wolffd@0
|
11 %
|
wolffd@0
|
12 % The optional argument (and return value) INVHESS is the inverse of
|
wolffd@0
|
13 % the network Hessian computed on the training data inputs and targets.
|
wolffd@0
|
14 % Passing it in avoids recomputing it, which can be a significant
|
wolffd@0
|
15 % saving for large training sets.
|
wolffd@0
|
16 %
|
wolffd@0
|
17 % See also
|
wolffd@0
|
18 % FEVBAYES
|
wolffd@0
|
19 %
|
wolffd@0
|
20
|
wolffd@0
|
21 % Copyright (c) Ian T Nabney (1996-2001)
|
wolffd@0
|
22
|
wolffd@0
|
23 y = rbffwd(net, x_test);
|
wolffd@0
|
24 % RBF outputs must be linear, so just pass them twice (second copy is
|
wolffd@0
|
25 % not used
|
wolffd@0
|
26 if nargin == 4
|
wolffd@0
|
27 [extra, invhess] = fevbayes(net, y, y, x, t, x_test);
|
wolffd@0
|
28 else
|
wolffd@0
|
29 [extra, invhess] = fevbayes(net, y, y, x, t, x_test, invhess);
|
wolffd@0
|
30 end |