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

Jensen-Shannon Divergence (not distance) #36

Open
rkjulian opened this issue May 3, 2024 · 1 comment
Open

Jensen-Shannon Divergence (not distance) #36

rkjulian opened this issue May 3, 2024 · 1 comment

Comments

@rkjulian
Copy link

rkjulian commented May 3, 2024

First, thank you for this terrific package!

Maybe this is intentional, but the value returned for the Jensen-Shannon "distance" (coded as 'd') is the divergence, not the distance metric. Taking the square root produces the distance according to the several sources referenced on the Wikipedia page for the JSD: https://en.wikipedia.org/wiki/Jensen-Shannon_divergence. I checked the Python function scipy.spatial.distance.jensenshannon(), and it returns the square root of the value produced by this package.

Maybe some clarification could be added to the documentation if you thought it was needed.

@HajkD
Copy link
Member

HajkD commented May 16, 2024

Hi @rkjulian

Apologies for the late reply, I am resurfacing slowly from my job transition from Tuebingen to Dundee.

You are absolutely correct and I think this needs to be clarified.

I will add this to the documentation to make this point crystal clear.

Thank you so much for reaching out to me.

With very best wishes,
Hajk

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