comparison toolboxes/FullBNT-1.0.7/nethelp3.3/gpfwd.htm @ 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 <html>
2 <head>
3 <title>
4 Netlab Reference Manual gpfwd
5 </title>
6 </head>
7 <body>
8 <H1> gpfwd
9 </H1>
10 <h2>
11 Purpose
12 </h2>
13 Forward propagation through Gaussian Process.
14
15 <p><h2>
16 Synopsis
17 </h2>
18 <PRE>
19 y = gpfwd(net, x)
20 [y, sigsq] = gpfwd(net, x)
21 [y, sigsq] = gpfwd(net, x, cninv)
22 </PRE>
23
24
25 <p><h2>
26 Description
27 </h2>
28 <CODE>y = gpfwd(net, x)</CODE> takes a Gaussian Process data structure <CODE>net</CODE>
29 together
30 with a matrix <CODE>x</CODE> of input vectors, and forward propagates the inputs
31 through the model to generate a matrix <CODE>y</CODE> of output
32 vectors. Each row of <CODE>x</CODE> corresponds to one input vector and each
33 row of <CODE>y</CODE> corresponds to one output vector. This assumes that the
34 training data (both inputs and targets) has been stored in <CODE>net</CODE> by
35 a call to <CODE>gpinit</CODE>; these are needed to compute the training
36 data covariance matrix.
37
38 <p><CODE>[y, sigsq] = gpfwd(net, x)</CODE> also generates a column vector <CODE>sigsq</CODE> of
39 conditional variances (or squared error bars) where each value corresponds to a pattern.
40
41 <p><CODE>[y, sigsq] = gpfwd(net, x, cninv)</CODE> uses the pre-computed inverse covariance
42 matrix <CODE>cninv</CODE> in the forward propagation. This increases efficiency if
43 several calls to <CODE>gpfwd</CODE> are made.
44
45 <p><h2>
46 Example
47 </h2>
48 The following code creates a Gaussian Process, trains it, and then plots the
49 predictions on a test set with one standard deviation error bars:
50 <PRE>
51
52 net = gp(1, 'sqexp');
53 net = gpinit(net, x, t);
54 net = netopt(net, options, x, t, 'scg');
55 [pred, sigsq] = gpfwd(net, xtest);
56 plot(xtest, pred, '-k');
57 hold on
58 plot(xtest, pred+sqrt(sigsq), '-b', xtest, pred-sqrt(sigsq), '-b');
59 </PRE>
60
61
62 <p><h2>
63 See Also
64 </h2>
65 <CODE><a href="gp.htm">gp</a></CODE>, <CODE><a href="demgp.htm">demgp</a></CODE>, <CODE><a href="gpinit.htm">gpinit</a></CODE><hr>
66 <b>Pages:</b>
67 <a href="index.htm">Index</a>
68 <hr>
69 <p>Copyright (c) Ian T Nabney (1996-9)
70
71
72 </body>
73 </html>