-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fix fast_random_hypergraph
#655
Conversation
The only thing that doesn't work is the |
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #655 +/- ##
==========================================
+ Coverage 93.44% 93.50% +0.06%
==========================================
Files 64 64
Lines 5004 5005 +1
==========================================
+ Hits 4676 4680 +4
+ Misses 328 325 -3 ☔ View full report in Codecov by Sentry. |
Thanks! Maybe add a test to check that (i) the seed works now (the reproducibility part) and (ii) |
@maximelucas, I added documentation to the new method I made and I added a test. (I verified that the test fails on the main branch) |
b191d54
to
a18e6a1
Compare
Quick aside is that comparing |
Okay, I fixed a bunch of random errors and should be good to go @maximelucas! |
Yea often numpy functions are much faster when generating a bunch of random numbers but slower for just one. |
Faster is great! Do they give the same distribution? |
I can do a KS test at some point! |
Okay, the distributions look similar, and the methods are the same (almost), but I think the difference that the KS test picked up on is due to numerical errors in the evaluation of the log function. |
fast_random_hypergraph
suffers from the same errors that were pointed out in issue #652. This attempts to fix these errors. As a side note, this now converts sampling using the log method intonp.random.geometric()
. Not sure how it compares performance-wise, but would be interesting to see.