Skip to contents

Y_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.

Usage

Ghosalnpnormalreg(x, y, length = 0.5, var = 1, sigma2 = 0.05)

Arguments

x

Design points.

y

Responses, matching x.

length

Squared-exponential length scale, positive.

var

Kernel variance, positive.

sigma2

Noise variance, positive.

Value

List with estimate (mean fitted value), fitted, sse, method.

Details

Formula: f-hat(x*) = k(x*, X) (K + sigma^2 I)^(-1) Y.

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"