gpsmoothing: Gaussian process smoothing

View source: R/wrapper.R

gpsmoothingR Documentation

Gaussian process smoothing

Description

Estimate hyper-parameters phi and noise standard deviation sigma for a vector of observations using Gaussian process smoothing.

Usage

gpsmoothing(yobs, tvec, kerneltype = "generalMatern", sigma = NULL)

Arguments

yobs

vector of observations

tvec

vector of time points corresponding to observations

kerneltype

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

sigma

the noise level (if known). By default, both phi and sigma are estimated. If a value for sigma is supplied, then sigma is held fixed at the supplied value and only phi is estimated.

Value

A list containing the elements phi and sigma with their estimated values.

Examples

# Sample data and observation times
tvec <- seq(0, 20, by = 0.5)
y <- c(-1.16, -0.18, 1.57, 1.99, 1.95, 1.85, 1.49, 1.58, 1.47, 0.96, 
0.75, 0.22, -1.34, -1.72, -2.11, -1.56, -1.51, -1.29, -1.22, 
-0.36, 1.78, 2.36, 1.78, 1.8, 1.76, 1.4, 1.02, 1.28, 1.21, 0.04, 
-1.35, -2.1, -1.9, -1.49, -1.55, -1.35, -0.98, -0.34, 1.9, 1.99, 1.84)

gpsmoothing(y, tvec)
 


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