Skip to contents

Recovers independent sources by finding maximally non-Gaussian projections: by the central limit theorem a mixture of independent sources is closer to Gaussian than any source is. Two indeterminacies are intrinsic, not defects – the SCALE of each source (absorbed into the mixing matrix, so components are returned with unit variance) and their ORDER. Any comparison to known sources must be up to permutation and sign. Gaussian sources cannot be separated at all, since a rotation of independent Gaussians is again independent Gaussian.

Usage

morie_esl_ica(
  X,
  k = NULL,
  fun = "logcosh",
  max_iter = 500L,
  tol = 1e-08,
  seed = 0L
)

Arguments

X

Observed mixtures, n by p.

k

Number of components; defaults to p.

fun

Contrast: "logcosh", "exp" or "cube".

max_iter, tol

Fixed-point controls.

seed

Seed for the random initialisation.

Value

List with sources (unit variance), unmixing, mixing, whitening, mean, n_iter, converged.

References

Hyvarinen, A., & Oja, E. (2000). Independent component analysis: Algorithms and applications. Neural Networks 13(4-5), 411-430.

Examples

if (requireNamespace("ranger", quietly = TRUE)) {
  tt <- seq(0, 8 * pi, length.out = 500)
  S <- cbind(sin(tt), sign(cos(2.7 * tt)))
  A <- matrix(c(1, -0.6, 0.7, 1.2), 2)
  r <- morie_esl_ica(S %*% t(A), k = 2, seed = 1L)
  round(apply(r$sources, 2, function(z) sqrt(mean((z - mean(z))^2))), 6)
}
#> [1] 1 1