-
Notifications
You must be signed in to change notification settings - Fork 194
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
expose epsilon parameter to allow precision to to be specified #275
expose epsilon parameter to allow precision to to be specified #275
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have one question, but besides the question, looks good to me.
const float epsilon{1e-6}; | ||
return ((w > -epsilon) && (w < epsilon)); | ||
bool __device__ near_zero<int32_t>(int32_t w, int32_t epsilon) { | ||
return (w == 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't we using epsilon here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For integer weights we can do an exact comparison to zero. For floating point values we need to do an approximate comparison.
@gpucibot merge |
Closes #1645 Closes #1646 Expose the precision parameter (epsilon in the Date/Nagi implementation) of the Hungarian algorithm to be controllable by the user. Add support for rectangular matrices. Will be enabled for CI after rapidsai/raft#275 is merged. Authors: - Chuck Hastings (https://github.com/ChuckHastings) Approvers: - Andrei Schaffer (https://github.com/aschaffer) - Brad Rees (https://github.com/BradReesWork) - Kumar Aatish (https://github.com/kaatish) URL: #1673
Per user request, this PR exposes the epsilon value that controls the precision where the Hungarian algorithm determines that a value has been reduced to sufficiently close to 0.