uwedge: uwedge

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

View source: R/uwedge.R

Description

Performs an approximate joint matrix diagonalization on a list of matrices. More precisely, for a list of matrices Rx the algorithm finds a matrix V such that for all i V Rx[i] t(V) is approximately diagonal.

Usage

1
2
3
uwedge(Rx, init = NA, Rx0 = NA, return_diag = FALSE, tol = 1e-10,
  max_iter = 1000, n_components = NA, minimize_loss = FALSE,
  condition_threshold = NA, silent = TRUE)

Arguments

Rx

list of matrices to be diagaonlized.

init

matrix used in first step of initialization. If NA a default based on PCA is used

Rx0

matrix used for initial scaling.

return_diag

boolean. Specifies whether to return the list of diagonalized matrices.

tol

float, optional. Tolerance for terminating the iteration.

max_iter

int, optional. Maximum number of iterations.

n_components

number of components to extract. If NA is passed, all components are used.

minimize_loss

boolean whether to compute loss function in each iteration step and output V with smallest loss over all iterations. Defaults to FALSE since it is computationally more expensive.

condition_threshold

float, optional. Stops iteration if condition number of V passes this threshold. Default NA, means no threshold is used.

silent

boolean whether to supress status outputs.

Details

For further details see the references.

Value

object of class 'uwedge' consisting of the following elements

V

joint diagonalizing matrix.

Rxdiag

list of diagonalized matrices.

converged

boolean specifying whether the algorithm converged for the given tol.

iterations

number of iterations of the approximate joint diagonalisation.

meanoffdiag

mean absolute value of the off-diagonal values of the to be jointly diagonalised matrices, i.e., a proxy of the approximate joint diagonalisation objective function.

Author(s)

Niklas Pfister and Sebastian Weichwald

References

Pfister, N., S. Weichwald, P. Bühlmann and B. Schölkopf (2018). Robustifying Independent Component Analysis by Adjusting for Group-Wise Stationary Noise ArXiv e-prints (arXiv:1806.01094).

Tichavsky, P. and Yeredor, A. (2009). Fast Approximate Joint Diagonalization Incorporating Weight Matrices. IEEE Transactions on Signal Processing.

See Also

The function coroICA uses uwedge.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## Example
set.seed(1)

# Generate data 20 matrix that can be jointly diagonalized
d <- 10
A <- matrix(rnorm(d*d), d, d)
A <- A%*%t(A)
Rx <- lapply(1:20, function(x) A %*% diag(rnorm(d)) %*% t(A))

# Perform approximate joint diagonalization
ptm <- proc.time()
res <- uwedge(Rx,
              return_diag=TRUE,
              max_iter=1000)
print(proc.time()-ptm)

# Average value of offdiagonal elements:
print(res$meanoffdiag)

coroICA documentation built on July 8, 2020, 7:31 p.m.

Related to uwedge in coroICA...