View source: R/rags2ridgesFused.R
KLdiv.fused | R Documentation |
Function calculating the Kullback-Leibler divergence between two sets of multivariate normal distributions. In other words, it calculates a weigthed mean of Kullback-Leibler divergences between multiple paired normal distributions.
KLdiv.fused(MtestList, MrefList, StestList, SrefList, ns, symmetric = FALSE)
MtestList |
A |
MrefList |
A |
StestList |
A |
SrefList |
A |
ns |
a |
symmetric |
a |
Function returns a numeric
representing the (optionally
symmetric) fused Kullback-Leibler divergence.
Anders Ellern Bilgrau, Wessel N. van Wieringen, Carel F.W. Peeters <carel.peeters@wur.nl>
KLdiv
# Create some toy data
n <- c(40, 60, 80)
p <- 10
Stest <- replicate(length(n), diag(p), simplify = FALSE)
Sref <- createS(n, p = p)
KLdiv.fused(StestList = Stest, SrefList = Sref, ns = n, symmetric = FALSE)
KLdiv.fused(StestList = Stest, SrefList = Sref, ns = n, symmetric = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.