pyriemann.utils.distance.distance_kullback_sym¶
- pyriemann.utils.distance.distance_kullback_sym(A, B, squared=False)¶
Symmetrized Kullback-Leibler divergence between SPD/HPD matrices.
The symmetrized Kullback-Leibler divergence between two SPD/HPD matrices \(\mathbf{A}\) and \(\mathbf{B}\) is the sum of left and right Kullback-Leibler divergences. It is also called Jeffreys divergence [1].
- Parameters:
- Andarray, shape (…, n, n)
First SPD/HPD matrices, at least 2D ndarray.
- Bndarray, shape (…, n, n)
Second SPD/HPD matrices, same dimensions as A.
- squaredbool, default False
Return squared distance.
New in version 0.5.
- Returns:
- dfloat or ndarray, shape (…,)
Symmetrized Kullback-Leibler divergence between A and B.
See also
References
[1]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