This function adds or removes the Vecchia approximation from a GP, DGP or linked (D)GP emulator
constructed by gp()
, dgp()
or lgp()
.
Arguments
- object
an instance of the S3 class
gp
,dgp
, orlgp
.- vecchia
a bool or a list of bools to indicate the addition or removal of the Vecchia approximation:
if
object
is an instance of thegp
ordgp
class,vecchia
is a bool that indicates either addition (vecchia = TRUE
) or removal (vecchia = FALSE
) of the Vecchia approximation fromobject
.if
object
is an instance of thelgp
class,x
can be a bool or a list of bools:if
vecchia
is a bool, it indicates either addition (vecchia = TRUE
) or removal (vecchia = FALSE
) of the Vecchia approximation from all individual (D)GP emulators contained inobject
.if
vecchia
is a list of bools, it should have same shape asstruc
that was supplied tolgp()
. Each bool in the list indicates if the corresponding (D)GP emulator contained inobject
shall have the Vecchia approximation added or removed.
- M
the size of the conditioning set for the Vecchia approximation in the (D)GP emulator training. Defaults to
25
.- ord
an R function that returns the ordering of the input to the (D)GP emulator for the Vecchia approximation. The function must satisfy the following basic rules:
the first argument represents the lengthscale-scaled input to the GP emulator or the lengthscale-scaled input to a GP node of the DGP emulator.
the output of the function is a vector of indices that gives the ordering of the input to the GP emulator or the input to the GP nodes of the DGP emulator.
If
ord = NULL
, the default random ordering is used. Defaults toNULL
.
Details
See further examples and tutorials at https://mingdeyu.github.io/dgpsi-R/.
Note
This function is useful for quickly switching between Vecchia and non-Vecchia approximations for an existing emulator without the need to reconstruct the emulator. If the emulator was built without the Vecchia approximation, the function can add it, and if the emulator was built with the Vecchia approximation, the function can remove it. If the current state already matches the requested state, the emulator remains unchanged.