aspcol.distance.covariance_distance_kl_divergence

aspcol.distance.covariance_distance_kl_divergence(mat1, mat2)

The Kullback Leibler divergence between two Gaussian distributions that has mat1 and mat2 as their covariance matrices.

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