This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def kl_mvn(m0, S0, m1, S1): | |
| """ | |
| https://stackoverflow.com/questions/44549369/kullback-leibler-divergence-from-gaussian-pm-pv-to-gaussian-qm-qv | |
| The following function computes the KL-Divergence between any two | |
| multivariate normal distributions | |
| (no need for the covariance matrices to be diagonal) | |
| Kullback-Liebler divergence from Gaussian pm,pv to Gaussian qm,qv. | |
| Also computes KL divergence from a single Gaussian pm,pv to a set | 
OlderNewer