bandle-gp: Compute GP gradient

gradientGPR Documentation

Compute GP gradient

Description

Internal R function to pass R to C++, not for external use.

Internal R function to pass R to C++, not for external use.

Function to perform Metropolis-Hastings for GP hyperparameters with different priors

Usage

gradientGP(Xk, tau, h, nk, D)

gradientGPmatern(Xk, tau, h, nk, D, materncov, nu)

posteriorgradientGPmatern(Xk, tau, h, nk, D, materncov, nu, hyppar)

gradientlogprior(h, hyppar)

likelihoodGP(Xk, tau, h, nk, D)

likelihoodGPmatern(Xk, tau, h, nk, D, materncov, nu)

posteriorGPmatern(Xk, tau, h, nk, D, materncov, nu, hyppar)

Gumbel(x, lambda, log = TRUE)

PCrhomvar(rho, a, lambda1, lambda2, log = TRUE)

metropolisGP(
  inith,
  X,
  tau,
  nk,
  D,
  niter,
  hyperMean = c(0, 0, 0),
  hyperSd = c(1, 1, 1)
)

metropolisGPmatern(
  inith,
  X,
  tau,
  nk,
  D,
  niter,
  nu = 2,
  hyppar = c(1, 1, 1),
  propSd = c(0.3, 0.1, 0.1)
)

Gumbel(x, lambda, log = TRUE)

PCrhomvar(rho, a, lambda1, lambda2, log = TRUE)

Arguments

Xk

The data

tau

The indexing parameters

h

GP hyperparameters

nk

Number of observations

D

number of samples

materncov

logical indicating whether matern covariance is used

nu

Smoothness of the matern covariance

hyppar

A vector indicating the penalised complexity prior hyperparameters. Default is c(1,1,1)

x

observation

lambda

scale parameter of the type-2 Gumbel distribution

log

logical indicating whether to return log. Default is TRUE

rho

length-scale parameter

a

amplitude

lambda1

first parameter of distribution

lambda2

second parameter of distribution

inith

initial hyperparamters

X

The data

niter

Number of MH iteractions

hyperMean

A vector indicating the log-normal means. Default is c(0,0,0).

hyperSd

A vector indicating the log-normal standard deviations. Default is c(1,1,1)

propSd

The proposal standard deviation. Default is c(0.3,0.1,0.1). Do not change unless you know what you are doing.

Value

Returns gp gradient

Returns gp gradient

Returns the gradient of the posterior

return the gradient of the log prior, length-scale, aamplitude and noise

Returns gp negative log likelihood

Returns gp negative log likelihood

Returns the negative log posterior of the GP

Returns the likelihood of the type-2 GUmbel distribution

Returns the likelihood of the bivariate penalised complexity prior

Returns new hyperparamters and the acceptance rate

Returns the likelihood of the type-2 GUmbel distribution

Returns the likelihood of the bivariate penalised complexity prior

Examples

Gumbel(3, lambda = 1)


ococrook/bandle documentation built on Nov. 4, 2024, 12:27 a.m.