condition_gaussian_process: Condition a Gaussian Process

View source: R/gp_functions.R

condition_gaussian_processR Documentation

Condition a Gaussian Process

Description

[Experimental]

Condition a Multivariate Normal distribution based on a Gaussian Process using a exponentiated quadratic covariance matrix.

Usage

condition_gaussian_process(
  n,
  x,
  y,
  x_new,
  amplitude = 1,
  length_scale = 1,
  delta = 1e-09
)

Arguments

n

number of random draws.

x

position of values to condition on.

y

values to condition on (at positions x).

x_new

new positions to estimate values at.

amplitude

Vertical scale of the covariance function

length_scale

Horizontal scale of the covariance function

delta

A small offset along the diagonal of the resulting covariance matrix to ensure the function returns a positive-semidefinite matrix. Can also be used as a white noise kernel to allow for increased variation at individual positions along the vector x.

Value

A matrix of size M \times N, where M is length(x_new), and N is n. Each column is a random draw from the conditioned multivariate normal where each row corresponds to the draw at the position in x_new.

Examples

x <- 1:10
y <- rep(0, 10)
x_new <- 11:15

condition_gaussian_process(3, x, y, x_new)

markjrieke/riekelib documentation built on Dec. 20, 2024, 4:57 a.m.