# Quasi-periodic covariance function, with fixed period
cf1 <- cf_periodic(
period = 5,
prior_period = prior_fixed(),
cf_base = cf_sexp(lscale = 2)
)
cf2 <- cf_sexp(lscale = 40)
cf <- cf1 * cf2
gp <- gp_init(cf)
# draw from the prior
set.seed(104930)
xt <- seq(-10, 10, len = 500)
plot(xt, gp_draw(gp, xt), type = "l")
Run the code above in your browser using DataLab