Computes the cross covariance matrix between two sets of locations for a spatial random process with a given covariance structure. Typically the two sets are a learning set and a test set.
covMat1Mat2(object, X1, X2, nugget.flag=FALSE)
an object specifying the covariance structure.
a matrix whose rows represent the locations of a first set (for instance a set of learning points).
a matrix whose rows represent the locations of a second set (for instance a set of test points).
an optional boolean. If TRUE
, the covariance between 2 equal locations takes into account the nugget effect (if any). Locations are considered equal if their euclidian distance is inferior to 1e-15
. Default is FALSE
.
a matrix of size (nb of rows of X1 * nb of rows of X2)
whose element (i1,i2)
is equal to the covariance between the locations specified by row i1
of X1
and row i2
of X2
.