bcgp: Draw samples from a bcgp model

Description Usage Arguments Details Value See Also Examples

View source: R/bcgp.R

Description

bcgp draws samples from the Bayesian Composite Gaussian Process model

Usage

1
2
3
bcgp(x, y, composite = TRUE, stationary = FALSE, priors = "default",
  inits = "random", noise = FALSE, algorithm = c("M-H and Gibbs",
  "Stan"), scaled = TRUE, ...)

Arguments

x

An n x d matrix containing the independent variables in the training set.

y

A vector containing the observed response values in the training set.

composite

A logical, TRUE for a composite of a global process and a local process, FALSE for non-composite (standard GP regression). Defaults to TRUE.

stationary

A logical, FALSE for a non-stationary process, TRUE for a stationary process. If FALSE, the variance for the process is σ^2(x), and if TRUE, the variance is σ^2. Defaults to FALSE.

priors

Can be either the string "default" or a list containing the values for the prior parameters.

priors = "default" (default): The priors are given default values.

priors via list: Set prior values by providing a list equal in length to the number of Markov chains. A call to createPriors() will assist in the correct creation of this list.

inits

Can be either the string "random" or a list of length chains. The elements of this list should be named lists, where each of these has the name of a parameter and is used to specify the initial values for that parameter for the corresponding chain.

inits = "random" (default): The initial values will be generated randomly from their respective prior distributions.

inits via list: Set initial values by providing a list equal in length to the number of Markov chains. A call to createInits() will assist in the correct creation of this list.

noise

If the data is assumed to be noise-free, then noise should be FALSE. Otherwise, it should be TRUE.

numUpdates

The number of updates in the proposal stepsize adaptation phase.

numAdapt

The number of samples within each update in the proposal stepsize adaptation phase.

burnin

The number of burnin samples to discard after the stepsize adaptation phase is finished

nmcmc

The number of samples to be kept for each Markov chain.

chains

A positive integer specifying the number of Markov chains. The default is 4.

cores

The number of cores to use when executing the Markov chains in parallel. The default is to use the value of the mc.cores option if it has been set and otherwise to default to 1 core.

Details

This draws samples from the posterior distribution for the Bayesian Composite Gaussian Process (BCGP) model.

Value

An object of S4 class bcgpfit representing the fitted results.

See Also

createPriors createInits

Other Major functions: bcgp_model

Examples

1
2
3
4
x <- matrix(runif(20, 0, 10), nrow = 10, ncol = 2)
y <- x[, 1] + sin(x[, 2])
priors <- createPriors(x, noise = FALSE)
bcgp(x, y, priors)

cbdavis33/bcgp documentation built on Oct. 1, 2019, 8:07 a.m.