% GET_EIGEN_BLOCK_TRACEDQDQ_A3 Obtain the eigen decomposition of the % augmented (extended) matrix, R, for the generating function such that % % [ T-r*Q T -Q 0 ] % R = [ T 0 -Q I ] % [ -Q -Q 0 0 ] % [ 0 I 0 0 ] % % where T is the positive-definite Toeplitz-like Block matrix, and Q is % symmetrical matrix, which can be non-Hermitian; function specifically % used to obtain the Schur complement of [r*Q*inv(T)*Q*inv(T) - Q*inv(T)] % % [G,J,rowcol] = GET_EIGEN_BLOCK_TRACEDQDQ_A3(M,hyp,r) % % Inputs: M : Time-series Inputs of Gaussian process, size nx1 % hyp : hyperparameters of the covariance function [g v] % r : scaling factor for stabilising pivoting (coefficient)matrix % % 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_tracedqdq_a3(M,hyp,r) [g_row,e_dec,g_toe,g_dqg]=eigen_tool(); rowcol=g_row(M); n=size(M,1); nn=4*n; rk3=size(rowcol,2); rk=rk3*3; A=zeros(rk); B=zeros(nn,rk); tmp1=g_toe(M,hyp,1); tmp2=g_dqg(M,hyp,1); B(1:n,1)=tmp1-r*tmp2; B(n+1:2*n,1)=tmp1; B(2*n+1:3*n,1)=-tmp2; B(1:n,rk3+1)=tmp1; B(2*n+1:3*n,rk3+1)=-tmp2; B(1:n,2*rk3+1)=-tmp2; B(n+1:2*n,2*rk3+1)=-tmp2; B(3*n+1,rk3+1)=1; for k=2:rk3 p=rowcol(k); tmp1=g_toe(M,hyp,p); tmp3=g_toe(M,hyp,p-1); tmp2=[0;tmp3(1:end-1,:)]; tmp4=tmp1-tmp2; tmp1=g_dqg(M,hyp,p); tmp3=g_dqg(M,hyp,p-1); tmp2=[0;tmp3(1:end-1,:)]; tmp3=tmp1-tmp2; B(1:n,k)=tmp4-r*tmp3; B(n+1:2*n,k)=tmp4; B(2*n+1:3*n,k)=-tmp3; B(1:n,rk3+k)=tmp4; B(2*n+1:3*n,rk3+k)=-tmp3; B(1:n,2*rk3+k)=-tmp3; B(n+1:2*n,2*rk3+k)=-tmp3; end tmp0=zeros(nn,rk); for k=1:rk3 p=rowcol(k); A(k,:)=B(p,:); tmp0(p,k)=1; p=n+p; A(rk3+k,:)=B(p,:); tmp0(p,rk3+k)=1; p=n+p; A(2*rk3+k,:)=B(p,:); tmp0(p,2*rk3+k)=1; end [G,J]=e_dec(A,B,tmp0);