annotate toolboxes/FullBNT-1.0.7/nethelp3.3/gpinit.htm @ 0:cc4b1211e677 tip

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