Function to calculate the Gram matrices and their eigenvalues and eigenvectors for a chosen reproducing kernel.
Function to calculate the Gram matrices and their eigenvalues and eigenvectors for a chosen reproducing kernel.
Calculates the Gram matrices Kv for v=1,…,vMax, and returns their associated eigenvalues and eigenvectors. The calculated Gram matrices may be not positive definite. The option "correction" of this function allows to replace the matrices Kv that are not positive definite by their "nearest positive definite" matrices.
X: Matrix of observations with n rows and d columns.
kernel: Character, the type of the reproducing kernel: matern (matern kernel), brownian (brownian kernel), gaussian (gaussian kernel), linear (linear kernel), quad (quadratic kernel).
Dmax: Integer, between 1 and d, indicates the order of interactions considered in the meta model: Dmax=1 is used to consider only the main effects, Dmax=2 to include the main effects and the interactions of order 2,….
correction: Logical, if TRUE, the program makes the correction to the matrices Kv that are not positive definite (see details). Set as TRUE by default.
verbose: Logical, if TRUE, the group v for which the correction is done is printed. Set as TRUE by default.
tol: Scalar, used if correction is TRUE. For each matrix Kv if λmin<λmax×tol, then the correction to Kv is done (see details). Set as 1e−8 by default.
Details
Let λv,i,i=1,...,n be the eigenvalues associated with matrix Kv. Set λmax=maxiλv,i and λmin=miniλv,i. The eigenvalues of Kv that is not positive definite are replaced by λv,i+epsilon, with espilon=λmax×tol. The value of tol depends on the type of the kernel and it is chosen small.
Returns
List of two components "names.Grp" and "kv": - names.Grp: Vector of size vMax, indicates the name of groups included in the meta model.
kv: List of vMax components with the same names as the vector names.Grp. Each element of the list is a list of two components "Evalues" and "Q":
Evalues: Vector of size n, eigenvalues of each Gram matrix Kv.
Q: Matrix with n rows and n columns, eigenvectors of each Gram matrix Kv.
References
Kamari, H., Huet, S. and Taupin, M.-L. (2019) RKHSMetaMod : An R package to estimate the Hoeffding decomposition of an unknown function by solving RKHS Ridge Group Sparse optimization problem. arXiv:1905.13695