predict-bcgpfit-method: 'predict' method for a 'bcgpfit' object

Description Usage Arguments Value See Also Examples

Description

This function computes Bayesian posterior predictions and prediction intervals.

Usage

1
2
## S4 method for signature 'bcgpfit'
predict(object, newdata = NULL, prob = 0.95, ...)

Arguments

object

a bcgpfit object

newdata

Optionally, an nPred x d numeric matrix of new data locations at which to predict. If omitted, the training data matrix is used. If newdata is provided, it should be provided on the same scale as the user-provided training data, i.e. do not transform to [0, 1]^d.

prob

a single number greater than 0 and less than 1 that specifes the width of the (equal-tailed) posterior prediction interval. For example, prob = 0.90 specifies that 90% prediction intervals are desired.

Value

An instance of S4 class bcgpfitpred

See Also

bcgpmodel bcgpfit posterior_predict

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
simData <- bcgpsims(composite = TRUE, stationary = FALSE, noise = FALSE,
                    d = 2, decomposition = TRUE)

model <- bcgpmodel(x = simData@training$x, y = simData@training$y,
                   composite = TRUE, stationary = FALSE, noise = FALSE)
fit <- bcgp_sampling(model, scaled = TRUE, cores = 4, nmcmc = 500,
                     burnin = 200)

fit
print(fit, pars = c("beta0", "w", "rhoG", "rhoL"), digits_summary = 3)
predict(fit)

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