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

Fixed dice coefficients computation #32

Merged
merged 2 commits into from
Aug 28, 2017

Conversation

cpalenmichel
Copy link

@cpalenmichel cpalenmichel commented Aug 24, 2017

Fixes #29

@@ -361,7 +361,7 @@ def _vectorized_dice(true_matrix, pred_matrix):

denom = np.repeat(true_sizes, np.diff(overlap.indptr))
denom += pred_sizes.take(overlap.indices)
overlap.data /= denom
overlap.data = (2 * overlap.data) / denom
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just do overlap.data *= 2 / denom

Copy link
Member

@jnothman jnothman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@jnothman jnothman merged commit 6022f3a into wikilinks:master Aug 28, 2017
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.

None yet

2 participants