Mercurial > hg > camir-aes2014
annotate 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 |
rev | line source |
---|---|
wolffd@0 | 1 function [e, varargout] = neterr_weighted(w, net, x, t, eso_w) |
wolffd@0 | 2 %NETERR Evaluate network error function for generic optimizers |
wolffd@0 | 3 % |
wolffd@0 | 4 % Description |
wolffd@0 | 5 % |
wolffd@0 | 6 % E = NETERR(W, NET, X, T) takes a weight vector W and a network data |
wolffd@0 | 7 % structure NET, together with the matrix X of input vectors and the |
wolffd@0 | 8 % matrix T of target vectors, and returns the value of the error |
wolffd@0 | 9 % function evaluated at W. |
wolffd@0 | 10 % |
wolffd@0 | 11 % [E, VARARGOUT] = NETERR(W, NET, X, T) also returns any additional |
wolffd@0 | 12 % return values from the error function. |
wolffd@0 | 13 % |
wolffd@0 | 14 % See also |
wolffd@0 | 15 % NETGRAD, NETHESS, NETOPT |
wolffd@0 | 16 % |
wolffd@0 | 17 |
wolffd@0 | 18 % Copyright (c) Ian T Nabney (1996-9) |
wolffd@0 | 19 |
wolffd@0 | 20 errstr = [net.type, 'err_weighted']; |
wolffd@0 | 21 net = netunpak(net, w); |
wolffd@0 | 22 |
wolffd@0 | 23 [s{1:nargout}] = feval(errstr, net, x, t, eso_w); |
wolffd@0 | 24 e = s{1}; |
wolffd@0 | 25 if nargout > 1 |
wolffd@0 | 26 for i = 2:nargout |
wolffd@0 | 27 varargout{i-1} = s{i}; |
wolffd@0 | 28 end |
wolffd@0 | 29 end |