Skip to content

Fixes divide by zero error / propagation problem #15635

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

Closed
wants to merge 2 commits into from

Conversation

pierrezeb
Copy link

In the cases where none of the K neighbors of a given point have a label then normalizer equals 0 and generates divide by zero erros. This creates NaNs in the label distribution and blocks label propagation.
By replacing 0 values of the normalizer by 1 this problem is avoided.

Reference Issues/PRs

What does this implement/fix? Explain your changes.

Any other comments?

In the cases where none of the K neighbors of a given point have a label then normalizer equals 0 and generates divide by zero erros. This creates NaNs in the label distribution and blocks label propagation.
By replacing 0 values of the normalizer by 1 this problem is avoided.
In the cases where none of the K neighbors of a given point have a label then normalizer equals 0 and generates divide by zero erros. This creates NaNs in the label distribution and blocks label propagation.
By replacing 0 values of the normalizer by 1 this problem is avoided.
@jnothman
Copy link
Member

Please add a test. We may be slow to review as we are focusing on a release. Ping if necessary

@rth rth added the Needs work label Nov 19, 2019
Base automatically changed from master to main January 22, 2021 10:51
@thomasjpfan
Copy link
Member

Closing because the issue was fixed in #15946 and #19271

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

Successfully merging this pull request may close these issues.

4 participants