Skip to contents

K(x, y) = sum_k lambda_k phi_k(x) phi_k(y). Mercer's theorem says every continuous kernel has such an expansion, and the random series W = sum_k a_k(t) Z_k with independent standard normal Z_k has exactly that covariance – so a series prior and a Gaussian process prior are the same object viewed two ways, which is what makes the RKHS computations of the chapter tractable. Cosine eigenbasis with lambda_k = k^(-2) here; the partial sums converge.

Usage

Ghosalseriesgp(x = 0.3, y = 0.7, n_terms = 60)

Arguments

x, y

Evaluation points.

n_terms

Number of terms summed; at least 3 so the convergence check has three partial sums to compare.

Value

List with estimate (the kernel value), partial_sums, converging, method.

Details

Formula: K(x, y) = sum_k k^(-2) phi_k(x) phi_k(y), phi_k(t) = sqrt(2) cos(k pi t).

References

Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, Examples 11.4 and 11.16.

Examples

Ghosalseriesgp()
#> $estimate
#> [1] -0.7564009
#> 
#> $partial_sums
#> [1] -0.7624256 -0.7544100 -0.7564009
#> 
#> $converging
#> [1] TRUE
#> 
#> $method
#> [1] "eigenexpansion GP kernel (GvdV 2017 Ex 11.16)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"