priors | R Documentation |
Functions for initializing hyperparameter priors which can then be passed
to gp_init
. See section Details for the prior explanations.
prior_fixed() prior_logunif() prior_lognormal(loc = 0, scale = 1) prior_half_t(df = 1, scale = 1)
loc |
Location parameter of the distribution |
scale |
Scale parameter of the distribution |
df |
Degrees of freedom |
The supported priors are:
prior_fixed
The hyperparameter is fixed to its initial value,
and is not optimized by gp_optim
.
prior_logunif
Improper uniform prior on the log of the parameter.
prior_lognormal
Log-normal prior (Gaussian prior on the logarithm of the parameter).
prior_half_t
Half Student-t prior for a positive parameter.
The hyperprior object.
Rasmussen, C. E. and Williams, C. K. I. (2006). Gaussian processes for machine learning. MIT Press.
# 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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.