Learn R Programming

ivaBSS (version 1.0.0)

jbss_achieved: JBSS Achieved

Description

The function calculates if the joint blind source separation (JBSS) is achieved.

Usage

jbss_achieved(W, A)

Arguments

W

Array of unmixing matrices with dimension [P, P, D].

A

Array of true mixing matrices with dimension [P, P, D].

Value

Logical. If TRUE the JBSS is considered achieved.

Details

The function calculates if the joint blind source separation is achieved. JBSS is considered achieved when the the location of maximum absolute values of each row of gain matrix G[,,d] = W[,,d] %*% A[,,d] is unique within the dataset, but shared between the datasets 1, ...,D. The first indicates that the sources are separated within dataset and the second indicates that the estimated sources are aligned in same order for each dataset.

References

Anderson, M. (2013). Independent vector analysis: Theory, algorithms, and applications. PhD dissertation, University of Maryland, Baltimore County.

See Also

joint_ISI, avg_ISI

Examples

Run this code
# NOT RUN {
# Mixing matrices and unmixing matrices generated
# from standard normal distribution
P <- 4; D <- 4;
W <- array(rnorm(P * P * D), c(P, P, D))
A <- array(rnorm(P * P * D), c(P, P, D))

jbss_achieved(W, A)

if (require("LaplacesDemon")) {
  # Generate sources from multivariate Laplace distribution
  P <- 4; N <- 1000; D <- 4;
  S <- array(NA, c(P, N, D))

  for (i in 1:P) {
    U <- array(rnorm(D * D), c(D, D))
    Sigma <- crossprod(U)
    S[i, , ] <- rmvl(N, rep(0, D), Sigma)
  }

  # Generate mixing matrices from standard normal distribution
  A <- array(rnorm(P * P * D), c(P, P, D))

  # Generate mixtures
  X <- array(NaN, c(P, N, D))
  for (d in 1:D) {
    X[, , d] <- A[, , d] %*% S[, , d]
  }

  # Estimate sources and unmixing matrices
  res_G <- NewtonIVA(X, source_density = "gaussian")
  jbss_achieved(coef(res_G), A)
}
# }

Run the code above in your browser using DataLab