Learn R Programming

kernelPSI (version 1.1.1)

FOHSIC: selects a fixed number of kernels which are most associated with the outcome kernel.

Description

This function implements a forward algorithm for kernel selection. In the first step, the kernel which maximizes the HSIC measure with the outcome kernel L is selected. In the subsequent iterations, the kernel which, combined with the selected kernels maximizes the HSIC measure is selected. For the sum kernel combination rule, the forward algorithm can be simplified. The kernels which maximize the HSIC measure with the kernel L are selected in a descending order.

Usage

FOHSIC(K, L, mKernels = 1L)

Arguments

K

list of kernel similarity matrices

L

kernel similarity matrix for the outcome

mKernels

number of kernels to be selected

Value

an integer vector containing the indices of the selected kernels

Details

FOHSIC implements the forward algorithm with a predetermined number of kernels mKernels. If the exact number of causal kernels is unavailable, the adaptive version adaFOHSIC should be preferred.

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
selection <- FOHSIC(K, L, 2)

# }

Run the code above in your browser using DataLab