Closed envp closed 5 years ago
@clbustos @mohawkjohn @agarie Can you please have a look at this?
I also wanted to add something like https://gist.github.com/vaibhav-y/9cee23e880ed5a76f218 more specifically the __binary_search_inv(lower, upper, predicate, mid_proportion)
function defined there, where would be the best place to add that ?
2/1/2016: Still pending.
Huh, I restarted the build on Travis to see if the tests are OK. Again, I'll merge once the tests are green.
Please don't merge binomial yet, I've across some interesting papers and references for finalizing the implementation, mainly the following.
Sadly, I'm yet to fully grasp what each of these is fully doing.
Apologies for the delay! Current status is on-hold. I'll get back to implementing this after school exams are done.
This PR is so far just these two commits:
Changelog: Add
GSL_.rng
&GSL_.quantile
for binomial distributionDistribution::Binomial::GSL_.rng
that wrapsgsl_ran_binomial(3)
Changelog: Updated ruby implementation of inverse CDF and added RNG to
Distribution::Binomial::Ruby
Updates
I ran the rspec tests one by one and found that this one gets stuck (the testcases starting on lines 70, 86 are fine)
line 72 gets stuck for some reason.
Pending an analysis. Something tells me this is related to how I changed the.:p_value
method, and is resulting in a cycle(?)This was because the new
quantile
implemented made calls tocdf
, which being slowO(N)
died or stalled, when asked to do this for 500 x 2 xsomething
test values. Removed the binary search based quantile method altogether as a result of this.1/26/16: Added the following commit to fix all issues and add tests:
Changelog: Reverted
GSL_.quantile
andRuby_.quantile
for binomial distribution and added various tests for RNGThis is in partial fulfillment of #21 Maintained TODO List: https://github.com/SciRuby/distribution/issues/21#issuecomment-172246401