Description Usage Arguments Value
View source: R/laplace_approx_prediction.R
This function directly takes the output from optimize_gp along with prediction locations and estimates the posterior distribution of the latent function conditional on the optimized covariance parameters and knots.
1 | predict_gp(mod, x_pred, mu_pred = NA, full_cov, vi = FALSE)
|
mod |
A list with the same elements and names as that generated by the optimize_gp function. A variable storing the output from the optimize_gp function can be passed directly to this argument. |
x_pred |
The matrix of prediction locations. These can also be observed data locations. |
mu_pred |
A vector: the marginal mean of the latent GP at the prediction locations. |
full_cov |
Logical value indicating whether to return the full predictive covariance matrix if TRUE, or to return just the marginal variances if FALSE. |
vi |
Logical value indicating whether predictions should be generated from the variational approximation or not. This should be true only if you selected to use variational inference in optimize_gp. |
List with the following components:
pred: a list containing pred$pred_mean which is the vector of the predicted means of the latent function, and pred$pred_var which are the predicted variances of the latent function.
sparse: logical value indicating whether predictions were made based on a sparse model
family: cahracter string indicating the distribution of the data conditional on the latent function
x_pred: the matrix of prediction locations
inverse_link: The function that maps the latent function to the conditional mean of the data distribution. In the case of binary data this is the logistic function. In the case of Poisson data this is m*exp(f(x)).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.