| kl.div {yest} | R Documentation |
Compute KL-divergence between two multivariate normal distributions.
kl.div(v0,m1,v1,inv=TRUE)
v0 |
(inverse) variance matrix of the first distribution |
m1 |
difference between expected values |
v1 |
(inverse) variance matrix of the second distribution |
inv |
whether entry matrices are inverse or not |
The formula can be found on pp. 78 of my PhD. thesis.
v1<-ind.rgauss(type=12) v2<-ind.rgauss(type=50) kl.div(v1,rep(0,4),v2)