Skip to contents

Evaluate a Gaussian-process mean function

Usage

evaluate_mean(mean, x)

Arguments

mean

A Gaussian-process mean specification.

x

Numeric vector or matrix of observations.

Value

A numeric vector with one mean value per observation.

Details

Means with fixed coefficients evaluate to \(h(x)^\top \beta\). A mean whose coefficients have a Gaussian prior evaluates to its prior mean \(h(x)^\top b\). Estimated coefficients, and those with a vague prior, have no value before a model is fitted; predict_gp() and coef() use the fitted values.

Stability

Stable: from version 1.0.0 this interface changes incompatibly only in a major release, after a deprecation period. Results and options that concern an experimental model class, kernel, or argument follow that interface's tier. See gaussianprocesses-package for the policy.

Examples

evaluate_mean(constant_mean(1), matrix(0, nrow = 4, ncol = 2))
#> [1] 1 1 1 1
evaluate_mean(linear_mean(c(1, 2)), c(0, 0.5, 1))
#> [1] 1 2 3