annotate toolboxes/FullBNT-1.0.7/nethelp3.3/gpinit.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 gpinit
wolffd@0 5 </title>
wolffd@0 6 </head>
wolffd@0 7 <body>
wolffd@0 8 <H1> gpinit
wolffd@0 9 </H1>
wolffd@0 10 <h2>
wolffd@0 11 Purpose
wolffd@0 12 </h2>
wolffd@0 13 Initialise Gaussian Process model.
wolffd@0 14
wolffd@0 15 <p><h2>
wolffd@0 16 Synopsis
wolffd@0 17 </h2>
wolffd@0 18 <PRE>
wolffd@0 19 net = gpinit(net, trin, trtargets, prior)
wolffd@0 20 net = gpinit(net, trin, trtargets, prior)
wolffd@0 21 </PRE>
wolffd@0 22
wolffd@0 23
wolffd@0 24 <p><h2>
wolffd@0 25 Description
wolffd@0 26 </h2>
wolffd@0 27 <CODE>net = gpinit(net, trin, trtargets)</CODE> takes a Gaussian Process data structure <CODE>net</CODE>
wolffd@0 28 together
wolffd@0 29 with a matrix <CODE>trin</CODE> of training input vectors and a matrix <CODE>trtargets</CODE> of
wolffd@0 30 training target
wolffd@0 31 vectors, and stores them in <CODE>net</CODE>. These datasets are required if
wolffd@0 32 the corresponding inverse covariance matrix is not supplied to <CODE>gpfwd</CODE>.
wolffd@0 33 This is important if the data structure is saved and then reloaded before
wolffd@0 34 calling <CODE>gpfwd</CODE>.
wolffd@0 35 Each row
wolffd@0 36 of <CODE>trin</CODE> corresponds to one input vector and each row of <CODE>trtargets</CODE>
wolffd@0 37 corresponds to one target vector.
wolffd@0 38
wolffd@0 39 <p><CODE>net = gpinit(net, trin, trtargets, prior)</CODE> additionally initialises the
wolffd@0 40 parameters in <CODE>net</CODE> from the <CODE>prior</CODE> data structure which contains the
wolffd@0 41 mean and variance of the Gaussian distribution which is sampled from.
wolffd@0 42
wolffd@0 43 <p><h2>
wolffd@0 44 Example
wolffd@0 45 </h2>
wolffd@0 46 Suppose that a Gaussian Process model is created and trained with input data <CODE>x</CODE>
wolffd@0 47 and targets <CODE>t</CODE>:
wolffd@0 48 <PRE>
wolffd@0 49
wolffd@0 50 net = gp(2, 'sqexp');
wolffd@0 51 net = gpinit(net, x, t);
wolffd@0 52 % Train the network
wolffd@0 53 save 'gp.net' net;
wolffd@0 54 </PRE>
wolffd@0 55
wolffd@0 56 Another Matlab program can now read in the network and make predictions on a data set
wolffd@0 57 <CODE>testin</CODE>:
wolffd@0 58 <PRE>
wolffd@0 59
wolffd@0 60 load 'gp.net';
wolffd@0 61 pred = gpfwd(net, testin);
wolffd@0 62 </PRE>
wolffd@0 63
wolffd@0 64
wolffd@0 65 <p><h2>
wolffd@0 66 See Also
wolffd@0 67 </h2>
wolffd@0 68 <CODE><a href="gp.htm">gp</a></CODE>, <CODE><a href="gpfwd.htm">gpfwd</a></CODE><hr>
wolffd@0 69 <b>Pages:</b>
wolffd@0 70 <a href="index.htm">Index</a>
wolffd@0 71 <hr>
wolffd@0 72 <p>Copyright (c) Ian T Nabney (1996-9)
wolffd@0 73
wolffd@0 74
wolffd@0 75 </body>
wolffd@0 76 </html>