Skip to contents

f ~ GP(0, k_l) with l itself given a prior. The evidence-weighted posterior over the length scale concentrates near the scale of the truth, which is how a Gaussian prior adapts to an unknown smoothness without being told it. The marginal likelihood of each candidate l is exact – the model is conjugate Gaussian – so the selection involves no approximation beyond the finite grid of candidates.

Usage

Ghosalgpadaptthm(
  n = 60,
  l_true = 0.2,
  l_grid = c(0.05, 0.2, 0.8),
  noise = 0.1,
  seed = 42
)

Arguments

n

Sample size on an equispaced design.

l_true

Length scale of the simulated truth.

l_grid

Candidate length scales, all positive.

noise

Observation noise standard deviation.

seed

Seed for the deterministic draws.

Value

List with estimate (selected length scale), log_evidence, method.

Details

Formula: log p(y | l) = -y' (K_l + sigma^2 I)^(-1) y / 2

  • log det(K_l + sigma^2 I) / 2, up to the constant.

References

Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 11.6.

Examples

Ghosalgpadaptthm()
#> $estimate
#> [1] 0.2
#> 
#> $log_evidence
#> [1]   64.8497   94.2778 -164.9203
#> 
#> $method
#> [1] "GP length-scale adaptation (GvdV 2017 sec. 11.6)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"