Description Usage Arguments Details Value Author(s) References Examples
Measures a distance between a mixing matrix inverse of A and an estimate of an unmixing matrix W.
1 | my_Amari(A, W)
|
A |
The inverse of the mixing matrix |
W |
The estimated unmixing matrix |
This is an implementation of the algorithm found in Sorensen, J. 2008. An Assessment of Hermite Function-based Approximations of Mutual Information Applied to Independent Component Analysis. Entropy. Vol. 10. pp745-756
Sorensen, 2008 cites Amari et al. 1996 for the expression.
The Amari Error/Distance
Hans-Peter Bakker
See details
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 | set.seed(1)
A <- matrix(runif(4), nrow = 2)
set.seed(2)
W <- matrix(runif(4), nrow = 2)
my_Amari(solve(A), W)
[1] 0.6755254
##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (A, W)
{
AInv <- A
WInv <- solve(W)
m <- nrow(A)
AInvWInv <- AInv %*% WInv
terms1 <- rowSums(abs(AInvWInv))/apply(abs(AInvWInv), 1,
max) - 1
terms2 <- colSums(abs(AInvWInv))/apply(abs(AInvWInv), 2,
max) - 1
return(1/(2 * m) * (sum(terms1) + sum(terms2)))
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.