Daniel@0: function [covp, covf] = gpcovarp(net, x1, x2) Daniel@0: %GPCOVARP Calculate the prior covariance for a Gaussian Process. Daniel@0: % Daniel@0: % Description Daniel@0: % Daniel@0: % COVP = GPCOVARP(NET, X1, X2) takes a Gaussian Process data structure Daniel@0: % NET together with two matrices X1 and X2 of input vectors, and Daniel@0: % computes the matrix of the prior covariance. This is the function Daniel@0: % component of the covariance plus the exponential of the bias term. Daniel@0: % Daniel@0: % [COVP, COVF] = GPCOVARP(NET, X1, X2) also returns the function Daniel@0: % component of the covariance. Daniel@0: % Daniel@0: % See also Daniel@0: % GP, GPCOVAR, GPCOVARF, GPERR, GPGRAD Daniel@0: % Daniel@0: Daniel@0: % Copyright (c) Ian T Nabney (1996-2001) Daniel@0: Daniel@0: errstring = consist(net, 'gp', x1); Daniel@0: if ~isempty(errstring); Daniel@0: error(errstring); Daniel@0: end Daniel@0: Daniel@0: if size(x1, 2) ~= size(x2, 2) Daniel@0: error('Number of variables in x1 and x2 must be the same'); Daniel@0: end Daniel@0: Daniel@0: covf = gpcovarf(net, x1, x2); Daniel@0: covp = covf + exp(net.bias);