comparison toolboxes/FullBNT-1.0.7/netlab3.3/gpcovarp.m @ 0:e9a9cd732c1e tip

first hg version after svn
author wolffd
date Tue, 10 Feb 2015 15:05:51 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e9a9cd732c1e
1 function [covp, covf] = gpcovarp(net, x1, x2)
2 %GPCOVARP Calculate the prior covariance for a Gaussian Process.
3 %
4 % Description
5 %
6 % COVP = GPCOVARP(NET, X1, X2) takes a Gaussian Process data structure
7 % NET together with two matrices X1 and X2 of input vectors, and
8 % computes the matrix of the prior covariance. This is the function
9 % component of the covariance plus the exponential of the bias term.
10 %
11 % [COVP, COVF] = GPCOVARP(NET, X1, X2) also returns the function
12 % component of the covariance.
13 %
14 % See also
15 % GP, GPCOVAR, GPCOVARF, GPERR, GPGRAD
16 %
17
18 % Copyright (c) Ian T Nabney (1996-2001)
19
20 errstring = consist(net, 'gp', x1);
21 if ~isempty(errstring);
22 error(errstring);
23 end
24
25 if size(x1, 2) ~= size(x2, 2)
26 error('Number of variables in x1 and x2 must be the same');
27 end
28
29 covf = gpcovarf(net, x1, x2);
30 covp = covf + exp(net.bias);