kernel_ica: Kernel Independent Component Analysis

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/kernel_ica.R

Description

The kernel ICA method by Bach and Jordan (see references). The contrast function was written in C++ using the Eigen3 library for computational speed. The package ManifoldOptim is utilized for minimization of the contrast function on the Stiefel manifold.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
kernel_ica(
  x,
  variant = c("kgv", "kcca"),
  kernel = c("gauss", "hermite"),
  nstarts = 1,
  eps = 1e-04,
  sigma = ifelse(ncol(x) < 1000, 1, 0.5),
  kappa = ifelse(ncol(x) < 1000, 0.02, 0.002),
  hermite_rank = 3,
  init = MD_distant_matrices(p = ncol(x), n = nstarts),
  solver_params = ManifoldOptim::get.solver.params(),
  optim_method = "RSD"
)

Arguments

x

A numeric matrix, where each column contains the measurements of a mixed data source.

variant

Either "kcca" or "kgv".

kernel

Either "gauss" or "hermite".

nstarts

The number of restarts of the kernel ICA method with a default value of one. Ignored, if the starting values in parameter init are set manually.

eps

Numeric precision parameter for the approximation of the kernel matrices.

sigma

Numeric value of the kernel variance. Default value is 1 for a given x with less than 1000 rows, otherwise 0.5.

kappa

Numeric dimming parameter. Default value is 2e^-2 for a given x with less than 1000 rows, otherwise 2e^-3.

hermite_rank

Integer. Rank of the hermite polynomial with a default value of 3. Ignored, when kernel was set to "gauss".

init

A list of p \times p orthogonal matrices, which are the starting points for the optimization in the Stiefel manifold. By default a number of orthogonal matrices specified in parameter nstarts is generated.

solver_params

An object returned from the method ManifoldOptim::get.solver.params which can be given several parameters for the optimization.

optim_method

The optimization method used in the Stiefel manifold. Default value is "RSG". This value is directly passed to ManifoldOptim::manifold.optim.

Details

Several points need to be considered when using kernel_ica:

Value

A class of type bss containing the following values:

Xmu

The mean values

S

The unmixed data

W

The unmixing matrix

cmin

The smallest resulting contrast function value of all kernel ICA runs

Author(s)

Christoph L. Koesner

Klaus Nordhausen

References

Kernel ICA implementation in Matlab and C by F. Bach:
https://www.di.ens.fr/~fbach/kernel-ica/index.htm

Francis R. Bach, Michael I. Jordan
Kernel independent component analysis
Journal of Machine Learning Research 2002
doi: 10.1162/153244303768966085

Sean Martin, Andrew M. Raim, Wen Huang, Kofi P. Adragni
ManifoldOptim: An R Interface to the ROPTLIB Library for Riemannian Manifold Optimization
Journal of Statistical Software 2020
doi: 10.18637/jss.v093.i01

See Also

manifold.optim
get.solver.params

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
require(JADE)
require(ICtest)

n <- 2000
p <- 3
S <- matrix(0, n, p)

# the three data sources used in this example
S[, 1] <- rexp(n, rate = 0.4)
S[, 2] <- runif(n, 2, 4)
S[, 3] <- rt(n, 5)

W <- ICtest::rorth(p) # creates an orthogonal matrix
y <- S %*% t(W) # mixes the data

# applying kernel ICA method
res <- KernelICA::kernel_ica(y, variant = "kgv", kernel = "hermite")

res$W # unmixing matrix
apply(S, 2, mean) # original means
res$Xmu # restored means (unordered and possibly with different sign each)

# restored data
z <- scale(res$S, center = -res$Xmu, scale = FALSE)
# MD distance of the returned matrix to the original mixing matrix.
JADE::MD(res$W, W)

## Not run: 
# Runs kernel ICA with the slower Gaussian kernel method and
# a the starting matrix returned from the first method call.
# The maximal iteration number in the optimization is reduced to a tenth.
res2 <- KernelICA::kernel_ica(
  y,
  variant = "kgv",
  kernel = "gauss",
  init = list(res$W),
  solver_params = ManifoldOptim::get.solver.params(Max_Iteration = 100)
)
JADE::MD(res2$W, W)

## End(Not run)

KernelICA documentation built on March 1, 2021, 5:08 p.m.