Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different result compared with sklearn.metric.mutual_info_score #9

Open
kaixiongg opened this issue Oct 20, 2022 · 2 comments
Open

Comments

@kaixiongg
Copy link

Readme provides the result as 0.02, is there any normalization or what influence the result?

x = np.array([1,1,1,0,0])
y=np.array([1,0,1,1,0])
mutual_info_score(x,y)
0.013844293808390418

@Craigacp
Copy link
Owner

Craigacp commented Oct 20, 2022

MIToolbox uses log base 2 for all computations, scikit-learn uses log base e. So our units are "bits" and theirs are "nats".

@kaixiongg
Copy link
Author

Understood. thanks for your reply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants