You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
frame
Out[8]:
U V MI
0 npreg age 0.127532
1 skin bmi 0.061203
2 bp age 0.009789
3 bp bmi 0.005360
4 npreg skin 0.003926
5 bp skin 0.003218
6 glu bp 0.002185
7 glu age 0.001108
8 glu bmi 0.000553
9 glu skin 0.000525
10 npreg glu -0.000194
11 skin age -0.000868
12 npreg bp -0.001922
13 bmi age -0.005869
14 npreg bmi -0.012551
The text was updated successfully, but these errors were encountered:
def calc_MI(x, y, bins):
c_xy = np.histogram2d(x, y, bins)[0]
g, p, dof, expected = chi2_contingency(c_xy, lambda_="log-likelihood")
mi = 0.5 * g / c_xy.sum()
return mi
See example:
The text was updated successfully, but these errors were encountered: