Skip to content

Commit 714b80f

Browse files
authored
Update mi.py
1 parent 5ec5ebf commit 714b80f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

mi.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
"""
22
Calculate mutual information between two variables
3+
https://en.wikipedia.org/wiki/Mutual_information
34
45
Phong D. Le - le.duc.phong@gmail.com
56
"""
@@ -10,8 +11,8 @@
1011

1112
def mutual_information(X, Y, dist1=None, dist2 = None):
1213
"""
13-
Calculate the mutual information between X and Y.
14-
Using single and joint entropies
14+
Calculate the mutual information between X and Y. Using single and joint entropies:
15+
https://en.wikipedia.org/wiki/Mutual_information#Relation_to_conditional_and_joint_entropy
1516
1617
I(X, Y) = H(X) + H(Y) - H(X, Y)
1718
"""

0 commit comments

Comments
 (0)