# doc-cache created by Octave 4.0.0
# name: cache
# type: cell
# rows: 3
# columns: 5
# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
stk_cholcov


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 747
 STK_CHOLCOV  [STK internal]

 CALL: C = stk_cholcov (A, ...)

    returns the result of chol (A, ...) when this succeeds. If chol fails,
    then a small amount of "regularization noise" is added to the diagonal
    of A, in order to make chol succeed (see the code for details).

 NOTE: why this function ?

    This is a first (rough) attempt at solving numerical problems that
    arise when chol is used with a covariance matrix that is semi-positive
    definite, or positive definite with some very small eigenvalues. See
    tickets #3, #4 and #13 on Sourceforge:

       https://sourceforge.net/p/kriging/tickets/3/
       https://sourceforge.net/p/kriging/tickets/4/
       https://sourceforge.net/p/kriging/tickets/13/

 See also: chol



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 28
 STK_CHOLCOV  [STK internal]



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 15
stk_make_matcov


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 993
 STK_MAKE_MATCOV computes a covariance matrix (and a design matrix)

 CALL: [K, P] = stk_make_matcov (MODEL, X0)

    computes the covariance matrix K and the design matrix P for the model
    MODEL at the set of points X0, which is expected to be an N x DIM
    array. As a result, a matrix K of size N x N and a matrix P of size
    N x L are obtained, where L is the number of regression functions in
    the linear part of the model; e.g., L = 1 if MODEL.order is zero
    (ordinary kriging).

 CALL: K = stk_make_matcov (MODEL, X0, X1)

    computes the covariance matrix K for the model MODEL between the sets
    of points X0 and X1. The resulting K matrix is of size N0 x N1, where
    N0 is the number of rows of XO and N1 the number of rows of X1.

 BE CAREFUL:

    stk_make_matcov (MODEL, X0) and stk_makematcov (MODEL, X0, X0) are NOT
    equivalent if model.lognoisevariance > - inf  (in the first case, the
    noise variance is added on the diagonal of the covariance matrix).



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 67
 STK_MAKE_MATCOV computes a covariance matrix (and a design matrix)



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 9
stk_model


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 983
 STK_MODEL generates a model with default covariance parameters

 CALL: MODEL = stk_model ()

   returns a structure MODEL (see below for a description of the fields in such
   a structure) corresponding to one-dimensional Gaussian process prior with a
   constant but unknown mean ("ordinary" kriging) and a stationary Matern
   covariance function.

 CALL: MODEL = stk_model (COVARIANCE_TYPE)

   uses the user-supplied COVARIANCE_TYPE instead of the default.

 CALL: MODEL = stk_model (COVARIANCE_TYPE, DIM)

   creates a DIM-dimensional model. Note that, for DIM > 1, anisotropic
   covariance functions are provided with default parameters that make them
   isotropic.

 In STK, a Gaussian process model is described by a 'model' structure,
 which has mandatory fields and optional fields.

   MANDATORY FIELDS: covariance_type, param, order, lognoisevariance
   OPTIONAL FIELD: param_prior, noise_prior, response_name, lm

 See also stk_materncov_iso, stk_materncov_aniso, ...



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 63
 STK_MODEL generates a model with default covariance parameters



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 14
stk_ortho_func


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1081
 STK_ORTHO_FUNC  [deprecated]

 CALL: P = stk_ortho_func (MODEL, X)

    computes the design matrix for the linear part of model MODEL at the set of
    evaluation points X. In general (see special case below), X is expected to
    be a structure, whose field 'a' contains the actual numerical data as an N
    x DIM matrix, where N is the number of evaluation points and and DIM the
    dimension of the space of factors. A matrix P of size N x L is returned,
    where L is the number of regression functions in the linear part of the
    model; e.g., L = 1 if MODEL.order is zero (ordinary kriging).

 DEPRECATED:

    At the present time, stk_ortho_func() only handles polynomial regressions,
    up to order 3 through the "historical" mechanism based on model.order.

    An experimental mechanisme that uses "linear model" objects is already
    available (see the code for details on how to activate this feature).

    stk_orth_func is deprecated and will be removed from future versions of
    STK (http://sourceforge.net/p/kriging/tickets/12).

 See also stk_make_matcov



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 29
 STK_ORTHO_FUNC  [deprecated]



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 11
stk_predict


# name: <cell-element>
# type: sq_string
# elements: 1
# length: 1352
 STK_PREDICT performs a kriging prediction from data

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

    performs a kriging prediction at the points XP, given the observations
    (XI, ZI) and the prior MODEL. The input arguments XI, ZI, and XP can be
    either numerical matrices or dataframes. More precisely, on a factor 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 kriging predictor in the first column (ZP.mean), and
     * the kriging variance in the second column (ZP.var).

 CALL: [ZP, LAMBDA, MU] = stk_predict(MODEL, XI, ZI, XP)

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

 CALL: [ZP, LAMBDA, MU, K] = stk_predict(MODEL, XI, ZI, XP)

    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.



# name: <cell-element>
# type: sq_string
# elements: 1
# length: 52
 STK_PREDICT performs a kriging prediction from data





