pyriemann.utils.distance.distance_kullback_sym(A, B)

Symmetrized Kullback-Leibler divergence between SPD/HPD matrices.

The symmetrized Kullback-Leibler divergence between two SPD/HPD matrices A and B is the sum of left and right Kullback-Leibler divergences. It is also called Jeffreys divergence [1].

Andarray, shape (…, n, n)

First SPD/HPD matrices, at least 2D ndarray.

Bndarray, shape (…, n, n)

Second SPD/HPD matrices, same dimensions as A.

dndarray, shape (…,) or float

Symmetrized Kullback-Leibler divergence between A and B.



An invariant form for the prior probability in estimation problems H. Jeffreys. Proceedings of the Royal Society of London A: mathematical, physical and engineering sciences, 1946, 186 (1007), pp. 453-461