Gaussian_hessianR: Calculate Hessian for a GP with Gaussian correlation

View source: R/Gaussian_hessian.R

Gaussian_hessianRR Documentation

Calculate Hessian for a GP with Gaussian correlation

Description

Calculate Hessian for a GP with Gaussian correlation

Usage

Gaussian_hessianR(XX, X, Z, Kinv, mu_hat, theta)

Arguments

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

Value

Matrix, the Hessian at XX

Examples

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

GauPro documentation built on April 11, 2023, 6:06 p.m.