function [logmax,dL]=nolin1d_grad_vonly_schur(x,M,y,g) % NOLIN1D_GRAD_VONLY_SCHUR This optimisation script uses only GRADIENT % information to perform Gaussian Process prior model optimisation for % time-series data, i.e. one-dimensional data, [M,y] with M as the input % and y as the output. Hessian is approximated by finite-differencing using % MATLAB operation. % The hyperparamters, g represents the length-scale, and V, the noise % variance. % % This is a fast algorithm using Generalised Schur algorithm to perform % computation task, impossible by standard MATLAB command. Note that, only % V is trained with g supplied as one of the variables. % % [logmax,dL] = NOLIN1D_GRAD_VONLY_SCHUR(x,M,y,g) % % Inputs: M : one-dimensional input column vector % y : one-dimensional output column vector % x : hyperparameter for GP, x = [V] for training % g : hyperparameter for GP, g to be supplied % % Outputs: logmax = log likelihood function value % dL = gradient vector value % % % (C) Gaussian Process Schur Toolbox 1.0 % (C) Copyright 2005-2007, Keith Neo % http://www.hamilton.ie N0=size(M,1); V=exp(x); G=get_eigen_block_a(M,[g V]); [logdet,yQy,trQ,yQQy]=schur_invbfastv3(G,y); logmax=logdet+N0*log(yQy); dL=V*(trQ-N0*yQQy/yQy);