Description Usage Arguments Value Author(s) References Examples
This function computes the Kullback-Leibler divergence between two mixtures of multidimensional ISR distributions.
1 | kullback(proportion1, pi1, mu1, proportion2, pi2, mu2, m)
|
proportion1, proportion2 |
vectors (which sums to 1) containing the K mixture proportions. |
pi1, pi2 |
matrices of size K*p, where K is the number of clusters and p the number of dimension, containing the probabilities of a good comparaison of the model (dispersion parameters). |
mu1, mu2 |
matrices of size K*sum(m), containing the modal ranks. Each row contains the modal rank for a cluster. In the case of multivariate ranks, the reference rank for each dimension are set successively on the same row. |
m |
a vector containing the size of ranks for each dimension. |
a real, the Kullback-Leibler divergence.
Quentin Grimonprez
http://en.wikipedia.org/wiki/Kullback
1 2 3 4 5 6 7 | proportion1 <- c(0.4, 0.6)
pi1 <- matrix(c(0.8, 0.75), nrow = 2)
mu1 <- matrix(c(1, 2, 3, 4, 4, 2, 1, 3), nrow = 2, byrow = TRUE)
proportion2 <- c(0.43, 0.57)
pi2 <- matrix(c(0.82, 0.7), nrow = 2)
mu2 <- matrix(c(1, 2, 3, 4, 4, 2, 1, 3), nrow = 2, byrow = TRUE)
dK <- kullback(proportion1, pi1, mu1, proportion2, pi2, mu2, 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.