Skip to contents

$$\bar{f}_* = K_*(K+\sigma_n^2 I)^{-1}y$$ Rasmussen & Williams (2006), eq. (2.23), (2.25).

Usage

Gppost(X, y, X_star, kernel = NULL, noise = 0)

Arguments

X

Training inputs, n x d.

y

Training targets.

X_star

Test inputs, m x d.

kernel

c(sf, l) or a function k(x1, x2).

noise

Observation noise standard deviation.

Value

Named list with estimate, weights, n, method.

References

Rasmussen & Williams (2006), eq. (2.25).

Examples

Gppost(X = c(1, 2, 3, 4, 5, 6, 7, 8), y = c(1, 2, 3, 4, 5, 6, 7, 8),
  X_star = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $weights
#> [1]  0.1880175  1.1465307  0.6586571  2.4495211  0.6202456  4.5914706 -0.5804606
#> [8]  7.7229647
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "GP posterior mean K_*(K+sn^2 I)^-1 y -- Rasmussen & Williams (2006) eq. (2.25)"
#>