Skip to contents

f ~ GP(0, k) means every finite-dimensional marginal is multivariate normal with covariance k(x_i, x_j). Kolmogorov extension turns that consistent family into a process, and the practical consequence is that a draw is nothing more than a Cholesky factor times a standard normal vector.

Usage

Ghosalgppriordef(x, length = 0.5, var = 1, seed = 42)

Arguments

x

Evaluation points.

length

Squared-exponential length scale, positive.

var

Kernel variance, positive.

seed

Seed for the deterministic draws.

Value

List with estimate (mean of the draw), f, method.

Details

Formula: f = L Z with L L' = K, K_ij = var exp(-(x_i - x_j)^2 / (2 length^2)), Z iid N(0, 1).

References

Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 2.2.1.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ghosalgppriordef(V)
#> $estimate
#> [1] -0.2783303
#> 
#> $f
#> [1]  0.4147198 -0.8275545  1.5917486  0.7764138 -0.9951898 -1.9095470 -1.3781853
#> [8]  0.1009524
#> 
#> $method
#> [1] "GP prior draw via Cholesky (GvdV 2017 sec. 2.2.1)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"