Skip to contents

Rasmussen & Williams (2006), Sec. 2.7 (the explicit-basis model): a fixed mean function is subtracted and the GP models what is left. Here the parametric fit is supplied rather than estimated, which is the form the residual-kriging literature uses.

Usage

Gpresid(X, y, y_pred, kernel = NULL, noise = 0)

Arguments

X

Inputs, n x d.

y

Observed targets.

y_pred

Parametric fitted values at the same inputs.

kernel

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

noise

Observation noise standard deviation.

Value

Named list with estimate, residual, fitted, loglik, n, method.

References

Rasmussen & Williams (2006), Sec. 2.7.

Examples

Gpresid(X = c(1, 2, 3, 4, 5, 6, 7, 8), y = c(1, 2, 3, 4, 5, 6, 7, 8),
  y_pred = c(1, 2, 3, 4, 5, 6, 7, 8))
#> $estimate
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $residual
#> [1] 0 0 0 0 0 0 0 0
#> 
#> $fitted
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $loglik
#> [1] -5.132182
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "GP on parametric residuals -- Rasmussen & Williams (2006) Sec. 2.7"
#>