fct_kv_EvaluesQ: Function to calculate the Gram matrices and their eigenvalues...

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Calculates the Gram matrices K_v 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 K_v that are not positive definite by their "nearest positive definite" matrices.

Usage

1
calc_Kv(X, kernel, Dmax, correction, verbose, tol)

Arguments

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 K_v 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 K_v if λ_{min} < λ_{max}\timestol, then the correction to K_v is done (see details). Set as 1e^{-8} by default.

Details

Let λ_{v,i},i=1,...,n be the eigenvalues associated with matrix K_v. Set λ_{max}={max}_{i}λ_{v,i} and λ_{min}={min}_{i}λ_{v,i}. The eigenvalues of K_v that is not positive definite are replaced by λ_{v,i}+epsilon, with espilon=λ_{max}\timestol. 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 n, eigenvalues of each Gram matrix K_v.

Q

Matrix with n rows and n columns, eigenvectors of each Gram matrix K_v.

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

RKHSMetaMod

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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

RKHSMetaMod documentation built on July 7, 2019, 1:07 a.m.