Calculate Hessian for a GP with Gaussian correlation
Calculate Hessian for a GP with Gaussian correlation
Gaussian_hessianR(XX, X, Z, Kinv, mu_hat, theta)
XX |
The vector at which to calculate the Hessian |
X |
The input points |
Z |
The output values |
Kinv |
The inverse of the correlation matrix |
mu_hat |
Estimate of mu |
theta |
Theta parameters for the correlation |
Matrix, the Hessian at XX
set.seed(0) n <- 40 x <- matrix(runif(n*2), ncol=2) f1 <- function(a) {sin(2*pi*a[1]) + sin(6*pi*a[2])} y <- apply(x,1,f1) + rnorm(n,0,.01) gp <- GauPro(x,y, verbose=2, parallel=FALSE);gp$theta gp$hessian(c(.2,.75), useC=FALSE) # Should be -38.3, -5.96, -5.96, -389.4 as 2x2 matrix
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.