FOHSIC: selects a fixed number of kernels which are most associated...

Description Usage Arguments Details Value Examples

View source: R/RcppExports.R

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

1
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

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.

Value

an integer vector containing the indices of the selected kernels

Examples

1
2
3
4
5
6
7
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)

kernelPSI documentation built on Dec. 8, 2019, 1:07 a.m.