Skip to content

Commit

Permalink
modify docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kzkadc committed Apr 3, 2024
1 parent 61669ee commit 51676eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ignite/metrics/mutual_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@

class MutualInformation(Metric):
r"""Calculates the `mutual information <https://en.wikipedia.org/wiki/Mutual_information>`_
between input :math:`X` and prediction :math:`Y`.
between input :math:`X` and prediction :math:`Y`.
.. math:: I(X;Y) = H(Y) - H(Y|X)
.. math::
I(X;Y) = H(Y) - H(Y|X)
= H \left( \frac{1}{N}\sum_{i=1}^N \hat{\mathbf{p}}_i \right)
- \frac{1}{N}\sum_{i=1}^N H(\hat{\mathbf{p}}_i),
Expand Down

0 comments on commit 51676eb

Please sign in to comment.