annotate toolboxes/FullBNT-1.0.7/nethelp3.3/consist.htm @ 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 <html>
wolffd@0 2 <head>
wolffd@0 3 <title>
wolffd@0 4 Netlab Reference Manual consist
wolffd@0 5 </title>
wolffd@0 6 </head>
wolffd@0 7 <body>
wolffd@0 8 <H1> consist
wolffd@0 9 </H1>
wolffd@0 10 <h2>
wolffd@0 11 Purpose
wolffd@0 12 </h2>
wolffd@0 13 Check that arguments are consistent.
wolffd@0 14
wolffd@0 15 <p><h2>
wolffd@0 16 Synopsis
wolffd@0 17 </h2>
wolffd@0 18 <PRE>
wolffd@0 19 errstring = consist(net, type, inputs, outputs)
wolffd@0 20 errstring = consist(net, type, inputs)
wolffd@0 21 errstring = consist(net, type)
wolffd@0 22 </PRE>
wolffd@0 23
wolffd@0 24
wolffd@0 25 <p><h2>
wolffd@0 26 Description
wolffd@0 27 </h2>
wolffd@0 28
wolffd@0 29 <p><CODE>errstring = consist(net, type, inputs)</CODE> takes a network
wolffd@0 30 data structure <CODE>net</CODE> together with a string <CODE>type</CODE> containing
wolffd@0 31 the correct network type, a matrix <CODE>inputs</CODE> of input vectors and checks
wolffd@0 32 that the data structure is consistent with the other arguments. An empty
wolffd@0 33 string is returned if there is no error, otherwise the string contains the
wolffd@0 34 relevant error message. If the <CODE>type</CODE> string is empty, then any
wolffd@0 35 type of network is allowed.
wolffd@0 36
wolffd@0 37 <p><CODE>errstring = consist(net, type)</CODE> takes a network data structure
wolffd@0 38 <CODE>net</CODE> together with a string <CODE>type</CODE> containing the correct
wolffd@0 39 network type, and checks that the two types match.
wolffd@0 40
wolffd@0 41 <p><CODE>errstring = consist(net, type, inputs, outputs)</CODE> also checks that the
wolffd@0 42 network has the correct number of outputs, and that the number of patterns
wolffd@0 43 in the <CODE>inputs</CODE> and <CODE>outputs</CODE> is the same. The fields in <CODE>net</CODE>
wolffd@0 44 that are used are
wolffd@0 45 <PRE>
wolffd@0 46 type
wolffd@0 47 nin
wolffd@0 48 nout
wolffd@0 49 </PRE>
wolffd@0 50
wolffd@0 51
wolffd@0 52 <p><h2>
wolffd@0 53 Example
wolffd@0 54 </h2>
wolffd@0 55
wolffd@0 56 <p><CODE>mlpfwd</CODE>, the function that propagates values forward through an MLP
wolffd@0 57 network, has the following check at the head of the file:
wolffd@0 58 <PRE>
wolffd@0 59
wolffd@0 60 errstring = consist(net, 'mlp', x, t);
wolffd@0 61 if ~isempty(errstring)
wolffd@0 62 error(errstring)
wolffd@0 63 end
wolffd@0 64 </PRE>
wolffd@0 65
wolffd@0 66
wolffd@0 67 <p><h2>
wolffd@0 68 See Also
wolffd@0 69 </h2>
wolffd@0 70 <CODE><a href="mlpfwd.htm">mlpfwd</a></CODE><hr>
wolffd@0 71 <b>Pages:</b>
wolffd@0 72 <a href="index.htm">Index</a>
wolffd@0 73 <hr>
wolffd@0 74 <p>Copyright (c) Ian T Nabney (1996-9)
wolffd@0 75
wolffd@0 76
wolffd@0 77 </body>
wolffd@0 78 </html>