
Nonparametric normal regression with a Gaussian process prior
Source:R/gh_c2_8.R
Ghosalnpnormalreg.RdY_i = f(x_i) + e_i with e normal and f ~ GP(0, k). Everything is conjugate, so the posterior mean is available in closed form and turns out to be exactly the kernel-ridge smoother – the Bayesian and the penalised-least-squares answers coincide, with sigma^2 playing the role of the penalty.
References
Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 2.4.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ghosalnpnormalreg(V, V)
#> $estimate
#> [1] 4.324763
#>
#> $fitted
#> [1] 0.962172 1.924318 2.886481 3.848626 4.810893 5.772218 6.740873 7.652519
#>
#> $sse
#> [1] 0.3184947
#>
#> $method
#> [1] "GP-prior normal regression (GvdV 2017 sec. 2.4)"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"