STK_PREDICT performs a kriging prediction

 CALL: ZP = stk_predict (MODEL, XP)
 CALL: ZP = stk_predict (MODEL, XI, ZI, XP)

    performs a kriging prediction at the points XP, given the MODEL and,
    if available, the data (XI, ZI).

    The MODEL argument can be either a prior model structure (as provided
    by stk_model) or a model object (for instance, a posterior model
    represented by an stk_model_gpposterior object).  If MODEL is already
    a posterior object and some additional data (XI, ZI) is provided, the
    model is first updated with the data before the prediction is actually
    carried out.

    The input arguments XI, ZI, and XP can be either numerical matrices or
    dataframes. More precisely, on an input space of dimension DIM,

     * XI must have size NI x DIM,
     * ZI must have size NI x 1,
     * XP must have size NP x DIM,

    where NI is the number of observations and NP the number of prediction
    points. The output ZP is a dataframe of size NP x 2, with:

     * the prediction mean in the first column (ZP.mean), and
     * the prediction variance in the second column (ZP.var).

    From a Bayesian point of view, ZP.mean and ZP.var are respectively the
    posterior mean and variance of the Gaussian process prior MODEL given the
    data (XI, ZI).  Note that, in the case of noisy data, ZP.var is the
    (posterior) variance of the latent Gaussian process, not the variance of a
    future noisy observation at location XP.

 CALL: [ZP, LAMBDA, MU] = stk_predict (MODEL, ...)

    also returns the matrix of kriging weights LAMBDA and the matrix of
    Lagrange multipliers MU.

 CALL: [ZP, LAMBDA, MU, K] = stk_predict (MODEL, ...)

    also returns the posterior covariance matrix K at the locations XP (this is
    an NP x NP covariance matrix). From a frequentist point of view, K can be
    seen as the covariance matrix of the prediction errors.

 SPECIAL CASE

    If ZI is empty, everything but ZP.mean is computed. Indeed, neither the
    kriging variance ZP.var nor the matrices LAMBDA and MU actually depend on
    the observed values.

Package: stk