Learn R Programming

kergp (version 0.5.7)

covMat: Generic Function: Covariance or Cross-Covariance Matrix Between two Sets of Locations

Description

Generic function returning a covariance or a cross-covariance matrix between two sets of locations.

Usage

covMat(object, X, Xnew, ...)

Value

A rectangular matrix with nrow(X) rows and nrow(Xnew)

columns containing the covariances \(K(\mathbf{x}_1, \mathbf{x}_2)\) for all the couples of sites

\(\mathbf{x}_1\) and \(\mathbf{x}_2\).

Arguments

object

Covariance kernel object.

X

A matrix with d columns, where d is the number of inputs of the covariance kernel. The \(n_1\) rows define a first set of sites or locations, typically used for learning.

Xnew

A matrix with d columns, where d is the number of inputs of the covariance kernel. The \(n_2\) rows define a second set of sites or locations, typically used for testing or prediction. If Xnew = NULL the same locations are used: Xnew = X.

...

Other arguments for methods.