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