Learn R Programming

kernelPSI (version 1.1.1)

adaQ: models the forward selection of the kernels for the adaptive variant

Description

Similarly to the fixed variant, the adaptive selection of the kernels in a forward fashion can also be modeled with a set of quadratic constraints. The constraints for adaptive selection can be split into two subsets. The first subset encodes the order of selection of the kernels, while the second subset encodes the selection of the number of the kernels. The two subsets are equally sized (length(K) - 1) and are sequentially included in the output list.

Usage

adaQ(K, select, n)

Arguments

K

list kernel similarity matrices

select

integer vector containing the order of selection of the kernels in K. Typically, the selection field of the output of FOHSIC.

n

number of selected kernels. Typically, the n field of the output of adaFOHSIC.

Value

list of matrices modeling the quadratic constraints of the adaptive selection event

References

Loftus, J. R., & Taylor, J. E. (2015). Selective inference in regression models with groups of variables.

Examples

Run this code
# NOT RUN {
n <- 50
p <- 20
K <- replicate(8, matrix(rnorm(n*p), nrow = n, ncol = p), simplify = FALSE)
K <-  sapply(K, function(X) return(X %*% t(X) / dim(X)[2]), simplify = FALSE)
L <- matrix(rnorm(n*p), nrow = n, ncol = p)
L <-  L %*% t(L) / p
adaS <- adaFOHSIC(K, L)
listQ <- adaQ(K, select = adaS[["selection"]], n = adaS[["n"]])
# }

Run the code above in your browser using DataLab