gpsmoothllik: Marginal log-likelihood for Gaussian process smoothing

View source: R/wrapper.R

gpsmoothllikR Documentation

Marginal log-likelihood for Gaussian process smoothing

Description

Marginal log-likelihood and gradient as a function of GP hyper-parameters phi and observation noise standard deviation sigma. For use in Gaussian process smoothing where values of phi and sigma may be optimized.

Usage

gpsmoothllik(phisig, yobs, rInput, kerneltype = "generalMatern")

Arguments

phisig

vector containing GP hyper-parameters phi and observation noise SD sigma. See calCov for the definitions of the hyper-parameters.

yobs

vector of observations

rInput

distance matrix between all time points of yobs

kerneltype

the covariance kernel, types matern, rbf, compact1, periodicMatern, generalMatern are supported. See calCov for their definitions.

Value

A list with elements value and grad, which are the log-likelihood value and gradient with respect to phisig, respectively.

Examples

# Suppose phi[1] = 0.5, phi[2] = 3, sigma = 0.1
gpsmoothllik(c(0.5, 3, 0.1), rnorm(10), abs(outer(0:9, t(0:9), '-')[, 1, ]))


magi documentation built on April 26, 2023, 1:12 a.m.