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