riecovest.distance.kl_divergence_gaussian

riecovest.distance.kl_divergence_gaussian(A, B)

The Kullback Leibler divergence between two Gaussian distributions

A and B are the covariance matrices of the two distributions. Assumes both of these distributions has zero mean.

It is a distance measure, so 0 means equal and then it goes to infinity and the matrices become more unequal.

Parameters:
  • mat1 (np.ndarray of shape (N, N)) – First covariance matrix, should be symmetric and positive definite

  • mat2 (np.ndarray of shape (N, N)) – Second covariance matrix, should be symmetric and positive definite

Returns:

dist – The distance between the two matrices

Return type:

float