Description Usage Arguments Details Value Author(s) References Examples
This function performs a Joint Approximate Diagonalization of a set of square, symmetric and real-valued matrices.
1 2 |
M |
DOUBLE ARRAY (KxKxN). Three-dimensional array with dimensions KxKxN representing the set of square, symmetric and real-valued matrices to be jointly diagonalized. N is the number of matrices. Matrices are KxK square matrices. |
W_est0 |
DOUBLE MATRIX (KxK). The initial guess of a joint diagonalizer. If NULL, an initial guess is automatically generated by the algorithm. |
eps |
DOUBLE. The algorithm stops when the criterium difference between two iterations is less than eps. |
itermax |
INTEGER. Alternatively, the algorithm stops when itermax sweeps have been performed without reaching convergence. If the maximum number of iteration is performed, a warning appears. |
keepTrace |
BOOLEAN. Do we want to keep the successive estimations of the joint diagonalizer. |
Given a set C_i of N KxK symmetric and real-valued matrices, the algorithm is looking for a matrix B such that \forall i \in [1,N], B C_i B^T is as close as possible of a diagonal matrix.
B |
Estimation of the Joint Diagonalizer. |
criter |
Successive estimates of the cost function across sweeps. |
B_trace |
Array of the successive estimates of B across iterations. |
Cedric Gouy-Pailler (cedric.gouypailler@gmail.com), from the initial matlab code by P. Tichavsky.
Tichavsky, P. & Yeredor, A.; Fast Approximate Joint Diagonalization Incorporating Weight Matrices; IEEE Trans. Signal Process., 2009, 57, 878-891
1 2 3 4 5 6 7 8 9 10 11 | # generating diagonal matrices
D <- replicate(30, diag(rchisq(df=1,n=10)), simplify=FALSE)
# Mixing and demixing matrices
B <- matrix(rnorm(100),10,10)
A <- solve(B)
C <- array(NA,dim=c(10,10,30))
for (i in 1:30) C[,,i] <- A %*% D[[i]] %*% t(A)
B_est <- uwedge(C)$B
# B_est should be an approximate of B=solve(A)
B_est %*% A
# close to a permutation matrix (with random scales)
|
[,1] [,2] [,3] [,4] [,5]
[1,] -2.220446e-16 -1.110223e-15 -2.968112e-15 6.661338e-16 6.008103e+00
[2,] 9.247501e-01 2.220446e-16 8.248610e-16 5.551115e-16 2.664535e-15
[3,] 7.771561e-16 1.600593e+00 1.089406e-15 7.771561e-16 1.332268e-15
[4,] -4.440892e-16 6.661338e-16 -5.828671e-16 3.108624e-15 1.065814e-14
[5,] 6.661338e-16 -8.881784e-16 1.053845e-16 1.831868e-15 -1.665335e-15
[6,] 0.000000e+00 -4.440892e-16 4.336809e-16 -4.884981e-15 -1.332268e-14
[7,] -4.440892e-16 3.330669e-16 6.357762e-16 -1.414137e+00 -1.332268e-15
[8,] -8.881784e-16 3.996803e-15 -1.301390e-14 -2.886580e-15 -5.684342e-14
[9,] -2.442491e-15 -3.708145e-14 4.687904e+01 -8.437695e-15 6.239453e-14
[10,] 1.421085e-14 4.618528e-14 -1.032507e-13 -3.197442e-14 2.131628e-13
[,6] [,7] [,8] [,9] [,10]
[1,] 1.221245e-15 4.218847e-15 4.440892e-16 -6.661338e-15 1.776357e-15
[2,] 0.000000e+00 5.551115e-16 -2.775558e-16 6.661338e-16 6.106227e-16
[3,] 1.110223e-16 3.275158e-15 -2.220446e-16 -1.110223e-15 1.887379e-15
[4,] -3.330669e-15 5.952067e+00 -4.996004e-15 -1.110223e-15 4.440892e-16
[5,] 4.440892e-16 1.942890e-16 5.551115e-17 -2.248737e+00 -6.661338e-16
[6,] 3.330669e-15 -6.217249e-15 4.107825e-15 1.332268e-15 -3.623952e+00
[7,] 0.000000e+00 3.330669e-16 3.330669e-16 -1.110223e-15 2.220446e-16
[8,] 2.393739e+01 -5.107026e-15 4.996004e-15 -3.552714e-15 -1.398881e-14
[9,] 2.187139e-14 -5.007106e-14 -2.470246e-14 3.641532e-14 8.881784e-15
[10,] -5.684342e-14 -3.197442e-14 -1.259077e+02 -1.421085e-14 7.105427e-15
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.