Description Usage Arguments Value Examples
This makes posterior predictions for either new data or for the training data.
1 2 |
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 |
A list with elements x
, an nPred x d
numeric matrix
representing the prediction locations and y
, an iter x nPred
matrix of simulations from the posterior predictive distribution. Each row of
the matrix is a vector of predictions generated using a single draw of the
model parameters from the posterior distribution.
1 2 3 4 5 6 7 8 9 10 11 | simData <- bcgpsims(composite = TRUE, stationary = FALSE, noise = FALSE,
d = 1, 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, algorithm = "NUTS",
control = list(adapt_delta = 0.90))
posterior_predict(fit)
posterior_predict(fit, newdata = matrix(runif(100, -0.5, 1.5), ncol = 1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.