comparison toolboxes/FullBNT-1.0.7/netlabKPM/neterr_weighted.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function [e, varargout] = neterr_weighted(w, net, x, t, eso_w)
2 %NETERR Evaluate network error function for generic optimizers
3 %
4 % Description
5 %
6 % E = NETERR(W, NET, X, T) takes a weight vector W and a network data
7 % structure NET, together with the matrix X of input vectors and the
8 % matrix T of target vectors, and returns the value of the error
9 % function evaluated at W.
10 %
11 % [E, VARARGOUT] = NETERR(W, NET, X, T) also returns any additional
12 % return values from the error function.
13 %
14 % See also
15 % NETGRAD, NETHESS, NETOPT
16 %
17
18 % Copyright (c) Ian T Nabney (1996-9)
19
20 errstr = [net.type, 'err_weighted'];
21 net = netunpak(net, w);
22
23 [s{1:nargout}] = feval(errstr, net, x, t, eso_w);
24 e = s{1};
25 if nargout > 1
26 for i = 2:nargout
27 varargout{i-1} = s{i};
28 end
29 end