-
Notifications
You must be signed in to change notification settings - Fork 310
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
Enhancement on uniform random sampling of indices near zero. #2153
Merged
rapids-bot
merged 22 commits into
rapidsai:branch-22.04
from
aschaffer:enh_ext_uniform_rw
Mar 24, 2022
Merged
Enhancement on uniform random sampling of indices near zero. #2153
rapids-bot
merged 22 commits into
rapidsai:branch-22.04
from
aschaffer:enh_ext_uniform_rw
Mar 24, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merge latest release 0.17
Merge latest branch-0.18
Update forked branch-0.18
Update forked branch-0.18 from release
Update branch-0.19 from release
update forked from release branch-0.19
Merge from release branch-0.19
Merge latest rapidsai:branch-0.19 into aschaffer:branch-0.19
Create forked branch-0.20
merge latest release branch-0.20
Merge latest rapidsai/branch-0.20 into forked branch-0.20
aschaffer/21.08 <- rapidsai/21.08
Codecov Report
@@ Coverage Diff @@
## branch-22.04 #2153 +/- ##
===============================================
Coverage ? 73.99%
===============================================
Files ? 157
Lines ? 10496
Branches ? 0
===============================================
Hits ? 7767
Misses ? 2729
Partials ? 0 Continue to review full report at Codecov.
|
BradReesWork
added
improvement
Improvement / enhancement to an existing function
non-breaking
Non-breaking change
labels
Mar 24, 2022
ChuckHastings
approved these changes
Mar 24, 2022
@gpucibot merge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a partial fix for #1979.
Specifically, given
N = out-deg(v)
and a random numberr ∈ [0,1]
, one must obtain the equivalent discreteindex ∈ {0,1,...,N-1}
. Previous implementation used an upper boundubound = N-1
and a linear interpolation. As the issue above mentioned that approach creates problems near the (lower) boundary.The fix uses a better bound, namely
ubound = N
and the discrete transformation:index = floor(r >= 1.0 ? N-1 : r*N)
.Attached Mathematica plots show the graphs for, say,
N = 13
andN=17
.This fix is not high priority for release 22-04, and can be included in the 22-06 release. Also, not all of the concerns formulated in the issue above are addressed by this PR. For example a uniform random generator callable from device is not yet available, but there are plans to perhaps expose something like that in
raft
.