We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, Thankyou for this package ! I'd like to use dice distance. I took a look at how the distances are calculated and it reminded me of the distances in pynndescent - so I think this could be implemented in the same way. See: https://github.com/lmcinnes/pynndescent/blob/13cf8e0a9f60741e4c1847a5447648fc4c1cae8d/pynndescent/distances.py#L209 i.e.
@numba.njit(fastmath=True, cache=True) def dice(x, y): num_true_true = 0.0 num_not_equal = 0.0 for i in range(x.shape[0]): x_true = x[i] != 0 y_true = y[i] != 0 num_true_true += x_true and y_true num_not_equal += x_true != y_true if num_not_equal == 0.0: return 0.0 else: return num_not_equal / (2.0 * num_true_true + num_not_equal)
happy to submit a PR but it's not much more than CTRL C CTRL V!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
Thankyou for this package !
I'd like to use dice distance. I took a look at how the distances are calculated and it reminded me of the distances in pynndescent - so I think this could be implemented in the same way. See:
https://github.com/lmcinnes/pynndescent/blob/13cf8e0a9f60741e4c1847a5447648fc4c1cae8d/pynndescent/distances.py#L209
i.e.
happy to submit a PR but it's not much more than CTRL C CTRL V!
The text was updated successfully, but these errors were encountered: