Learn R Programming

kernelPSI (version 1.1.1)

adaFOHSIC: adaptively selects a subset of kernels in a forward fashion.

Description

This function is similar to the FOHSIC function. The only difference lies in the adaptive selection of the number of causal kernels. First, similarly to FOHSIC, the order of selection of the \(n\) kernels in K is determined, and then, the size of the subset of ordered kernels is chosen. The size is chosen as to maximize the overall association with the kernel L.

Usage

adaFOHSIC(K, L)

Arguments

K

list of kernel similarity matrices

L

kernel similarity matrix for the outcome

Value

a list where the the first item selection is the order of selection of all kernels in the list K and the second item is the number of selected kernels.

Examples

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

# }

Run the code above in your browser using DataLab