Skip to content

Commit

Permalink
modify formula of docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
kzkadc committed Apr 4, 2024
1 parent 51676eb commit 6ededec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ignite/metrics/mutual_information.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ class MutualInformation(Metric):
.. math::
I(X;Y) = H(Y) - H(Y|X)
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),
H(\mathbf{p}) = -\sum_{c=1}^C p_c \log p_c.
- \frac{1}{N}\sum_{i=1}^N H(\hat{\mathbf{p}}_i), \\
H(\mathbf{p}) &= -\sum_{c=1}^C p_c \log p_c.
where :math:`\hat{\mathbf{p}}_i` is the prediction probability vector for :math:`i`-th input,
and :math:`H(\mathbf{p})` is the entropy of :math:`\mathbf{p}`.
Expand Down

0 comments on commit 6ededec

Please sign in to comment.