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

Information distance was all NaN #27

Closed
wants to merge 2 commits into from

Conversation

jarioksa
Copy link
Contributor

This is a long-standing bug that propagated NaN to all entries of information distance in new distx.c and distxy.c code, whereas the R code of oldDistance worked. Now new C code and old R code give numerically identical results.

The NaN obviously appeared when both columns (species) were zero and the sum of species was 0 leading to expression 0/0, and there was an idea (via Adist,Bdist) to fix this, but it was not implemented.

Now oldDistance and distance give identical numerical results
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

Successfully merging this pull request may close these issues.

1 participant