pred | R Documentation |
If fit
is for a model that marginalizes the latent
signal f
(i.e. is_f_sampled(fit)
is FALSE
), this
computes the analytic conditional posterior
distributions of each model component, their sum, and the conditional
predictive distribution. All these are computed for
each (hyper)parameter draw (defined by draws
), or other parameter
set (obtained by a reduction defined by reduce
). Results are stored
in a GaussianPrediction object which is then returned.
If fit
is for a model that samples the latent
signal f
(i.e. is_f_sampled(fit)
is TRUE
), this will
extract these function samples, compute their sum, and a version of the
sum f
that is transformed through the inverse link function.
If x
is not NULL
, the function draws are extrapolated
to the points specified by x
using kernel regression.
Results are stored in a Prediction
object which is then returned.
pred(
fit,
x = NULL,
reduce = function(x) base::mean(x),
draws = NULL,
verbose = TRUE,
STREAM = get_stream(),
c_hat_pred = NULL,
force = FALSE,
debug_kc = FALSE
)
fit |
An object of class lgpfit. |
x |
A data frame of points where function posterior distributions
and predictions should be computed or sampled.
The function |
reduce |
Reduction for parameters draws. Can be a function that
is applied to reduce all parameter draws into one parameter set, or
|
draws |
Indices of parameter draws to use, or |
verbose |
Should more information and a possible progress bar be printed? |
STREAM |
External pointer. By default obtained with
|
c_hat_pred |
This is only used if the latent signal |
force |
This is by default |
debug_kc |
If this is |
An object of class GaussianPrediction or Prediction.
Other main functions:
create_model()
,
draw_pred()
,
get_draws()
,
lgp()
,
prior_pred()
,
sample_model()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.