calc_Kv {RKHSMetaMod} | R Documentation |
Function to calculate the Gram matrices and their eigenvalues and eigenvectors for a chosen reproducing kernel.
Description
Calculates the Gram matrices for
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
that are not positive definite by their "nearest positive definite" matrices.
Usage
calc_Kv(X, kernel, Dmax, correction, verbose, tol)
Arguments
X |
Matrix of observations with |
kernel |
Character, the type of the reproducing kernel: matern |
Dmax |
Integer, between |
correction |
Logical, if TRUE, the program makes the correction to the matrices |
verbose |
Logical, if TRUE, the group |
tol |
Scalar, used if correction is TRUE. For each matrix |
Details
Let be the eigenvalues associated with matrix
. Set
and
. The eigenvalues of
that is not positive definite are replaced by
epsilon, with espilon
tol. The value of tol depends on the type of the kernel and it is chosen small.
Value
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 |
Q |
Matrix with |
Note
Note.
Author(s)
Halaleh Kamari
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>
See Also
Examples
d <- 3
n <- 50
library(lhs)
X <- maximinLHS(n, d)
c <- c(0.2,0.6,0.8)
F <- 1;for (a in 1:d) F <- F*(abs(4*X[,a]-2)+c[a])/(1+c[a])
epsilon <- rnorm(n,0,1);sigma <- 0.2
Y <- F + sigma*epsilon
Dmax <- 3
kernel <- "matern"
Kv <- calc_Kv(X, kernel, Dmax)
names <- Kv$names.Grp
Eigen.val1 <- Kv$kv$v1.$Evalues
Eigen.vec1 <- Kv$kv$v1.$Q