annotate toolboxes/FullBNT-1.0.7/nethelp3.3/gpcovar.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 gpcovar
Daniel@0 5 </title>
Daniel@0 6 </head>
Daniel@0 7 <body>
Daniel@0 8 <H1> gpcovar
Daniel@0 9 </H1>
Daniel@0 10 <h2>
Daniel@0 11 Purpose
Daniel@0 12 </h2>
Daniel@0 13 Calculate the covariance for a Gaussian Process.
Daniel@0 14
Daniel@0 15 <p><h2>
Daniel@0 16 Synopsis
Daniel@0 17 </h2>
Daniel@0 18 <PRE>
Daniel@0 19 cov = gpcovar(net, x)
Daniel@0 20 [cov, covf] = gpcovar(net, x)
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
Daniel@0 28 <p><CODE>cov = gpcovar(net, x)</CODE> takes
Daniel@0 29 a Gaussian Process data structure <CODE>net</CODE> together with
Daniel@0 30 a matrix <CODE>x</CODE> of input vectors, and computes the covariance
Daniel@0 31 matrix <CODE>cov</CODE>. The inverse of this matrix is used when calculating
Daniel@0 32 the mean and variance of the predictions made by <CODE>net</CODE>.
Daniel@0 33
Daniel@0 34 <p><CODE>[cov, covf] = gpcovar(net, x)</CODE> also generates the covariance
Daniel@0 35 matrix due to the covariance function specified by <CODE>net.covarfn</CODE>
Daniel@0 36 as calculated by <CODE>gpcovarf</CODE>.
Daniel@0 37
Daniel@0 38 <p><h2>
Daniel@0 39 Example
Daniel@0 40 </h2>
Daniel@0 41 In the following example, the inverse covariance matrix is calculated
Daniel@0 42 for a set of training inputs <CODE>x</CODE> and is then
Daniel@0 43 passed to <CODE>gpfwd</CODE> so that predictions (with mean <CODE>ytest</CODE> and
Daniel@0 44 variance <CODE>sigsq</CODE>) can be made for the test inputs
Daniel@0 45 <CODE>xtest</CODE>.
Daniel@0 46 <PRE>
Daniel@0 47
Daniel@0 48 cninv = inv(gpcovar(net, x));
Daniel@0 49 [ytest, sigsq] = gpfwd(net, xtest, cninv);
Daniel@0 50 </PRE>
Daniel@0 51
Daniel@0 52
Daniel@0 53 <p><h2>
Daniel@0 54 See Also
Daniel@0 55 </h2>
Daniel@0 56 <CODE><a href="gp.htm">gp</a></CODE>, <CODE><a href="gppak.htm">gppak</a></CODE>, <CODE><a href="gpunpak.htm">gpunpak</a></CODE>, <CODE><a href="gpcovarp.htm">gpcovarp</a></CODE>, <CODE><a href="gpcovarf.htm">gpcovarf</a></CODE>, <CODE><a href="gpfwd.htm">gpfwd</a></CODE>, <CODE><a href="gperr.htm">gperr</a></CODE>, <CODE><a href="gpgrad.htm">gpgrad</a></CODE><hr>
Daniel@0 57 <b>Pages:</b>
Daniel@0 58 <a href="index.htm">Index</a>
Daniel@0 59 <hr>
Daniel@0 60 <p>Copyright (c) Ian T Nabney (1996-9)
Daniel@0 61
Daniel@0 62
Daniel@0 63 </body>
Daniel@0 64 </html>