% GET_EIGEN_BLOCK_TRACE_AHESS Obtain the eigen decomposition of the % Hermitian matrix, R, for the generating function such that % % [-T d2Q I] % R = [d2Q 0 0] % [ I 0 0] % % where T is the positive-definite Toeplitz-like Block matrix, and d2Q is % symmetric, not necessary positive-defininite. d2Q is, in fact, the 2nd % derivative of the covariance matrix C wrt g, as defined below. % % [G,J,rowcol] = GET_EIGEN_BLOCK_TRACE_AHESS(M,hyp) % % Inputs: M : Time-series Inputs of Gaussian process, size nx1 % hyp : hyperparameters of the covariance function [g v] % % Outouts: G = Generates the Generating function (matrix) % J = J-unitary matrix, J=[I 0;0 -I] % rowcol = block-position % % Note that the covariance function used, is the usual convention, of % C(Z|g,v) = exp(-0.5*g*[Zi-Zj]^2) + v % % % (C) Gaussian Process Schur Toolbox 1.0 % (C) Copyright 2005-2007, Keith Neo % http://www.hamilton.ie function [G,J,rowcol]=get_eigen_block_trace_ahess(M,hyp) [g_row,e_dec,g_toe,g_dqg,g_to3,g_drn,g_drm,g_hes]=eigen_tool(); rowcol=g_row(M); n=size(M,1); nn=3*n; rk2=size(rowcol,2); rk=rk2*2; A=zeros(rk); B=zeros(nn,rk); B(1:n,1)=-g_toe(M,hyp,1); tmp1=g_hes(M,hyp,1); B(n+1:2*n,1)=tmp1; B(1:n,rk2+1)=tmp1; B(2*n+1,1)=1; for k=2:rk2 p=rowcol(k); tmp1=g_toe(M,hyp,p); tmp3=g_toe(M,hyp,p-1); tmp2=[0;tmp3(1:end-1,:)]; B(1:n,k)=tmp2-tmp1; tmp1=g_hes(M,hyp,p); tmp3=g_hes(M,hyp,p-1); tmp2=[0;tmp3(1:end-1,:)]; tmp3=tmp1-tmp2; B(n+1:2*n,k)=tmp3; B(1:n,rk2+k)=tmp3; end tmp0=zeros(nn,rk); for k=1:rk2 p=rowcol(k); A(k,:)=B(p,:); tmp0(p,k)=1; p=n+p; A(rk2+k,:)=B(p,:); tmp0(p,rk2+k)=1; end [G,J]=e_dec(A,B,tmp0);