bcgpfitpred-class: An S4 class to represent a fitted BCGP model with predictions

Description Slots See Also Examples

Description

This class contains the data, both raw and scaled, information about the distributions for the parameters, the values of the hyperparameters, the number of chains desired to be fit, whether the data was scaled to [0, 1]^d before fitting, along with some other information about the type of model fit (composite/non-composite, stationary/non-stationary, deterministic/noisy), and predictions at new data locations.

Slots

model_name

A character describing the type of model that was fit. Corresponds to the values for stationary and composite.

data

A list that contains the training data. One element of the list contains the raw data, and one element contains the scaled data in which the independent variables are scaled to [0, 1]^d, and the response variable is scaled to have mean 0 and variance 1.

composite

A logical indicating whether the model is composite or not.

stationary

A logical indicating whether the model is stationary or not.

noise

A logical indicating whether the data is noisy or deterministic (as from a computer model).

scaled

A logical indicating whether the data was scaled before fitting. It is highly recommended to scale the data before fitting.

chains

A positive integer specifying the number of Markov chains

priors

A list with an element for each parameter in the BCGP model specified by composite and stationary. Each element contains the values of the hyperparameters for each parameter.

distributions

A list with an element for each parameter in the BCGP model specified by composite and stationary. Each element contains a character string identifying the prior distribution for each parameter.

init

A list of length chains that contains initial values for each parameter for the MCMC algorithm.

model_pars

A character vector giving the parameter names

par_dims

A list giving the dimension of each parameter

sim

A list containing the posterior samples, along with other information

algorithm

Either "NUTS" for the No U-Turn Sampler implemented by Stan, or "MH" for a Metropolis-Hastings algorithm

sampler_args

A list containing information about the sampling algorithm.

preds

A list containing the prediction locations and the predictions.

See Also

bcgp_sampling bcgpmodel bcgpfit predict posterior_predict

Examples

1
2
3
4
5
6
7
8
9
simData <- bcgpsims(composite = TRUE, stationary = FALSE, noise = FALSE)
model <- bcgpmodel(x = simData@training$x, y = simData@training$y
                   composite = TRUE, stationary = FALSE, noise = TRUE)
## Not run: 
bcgp_sampling(model, algorithm = "NUTS", scaled = TRUE, chains = 3L,
              cores = 1L, control = list(adapt_delta = 0.99,
                                         max_treedepth = 15))

## End(Not run)

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