Learn R Programming

kernelPSI (version 1.1.1)

forwardQ: models the forward selection event of a fixed number of kernels as a succession of quadratic constraints

Description

The selection of the kernels with the forward algorithm implemented in FOHSIC can be represented as a set of quadratic constraints. This is owed to the quadratic form of the HSIC criterion. In this function, we determine the matrices of the corresponding constraints. The output is a list of matrices where the order is identical to the order of selection of the kernels. The matrices are computed such the associated constraint is nonnegative. For a length \(n\) of the list K, the total number of constraints is \(n - 1\).

Usage

forwardQ(K, select)

Arguments

K

list kernel similarity matrices

select

integer vector containing the indices of the selected kernels

Value

list of matrices modeling the quadratic constraints of the selection event

Examples

Run this code
# NOT RUN {
n <- 50
p <- 20
K <- replicate(5, matrix(rnorm(n*p), nrow = n, ncol = p), simplify = FALSE)
K <-  sapply(K, function(X) return(X %*% t(X) / dim(X)[2]), simplify = FALSE)
listQ <- forwardQ(K, select = c(4, 1))
# }

Run the code above in your browser using DataLab