Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

Native RNGs

Open ArunS-tack opened this issue 1 year ago • 8 comments

Targeted at #294. Removes Rmath dependence of RNGs for Noncentral distributions.

ArunS-tack avatar Mar 18 '23 18:03 ArunS-tack

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.01 :warning:

Comparison is base (630e1c9) 85.82% compared to head (8b816f2) 85.81%.

:exclamation: Current head 8b816f2 differs from pull request most recent head a5fa5e2. Consider uploading reports for the commit a5fa5e2 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1698      +/-   ##
==========================================
- Coverage   85.82%   85.81%   -0.01%     
==========================================
  Files         137      137              
  Lines        8315     8311       -4     
==========================================
- Hits         7136     7132       -4     
  Misses       1179     1179              
Impacted Files Coverage Δ
src/univariate/continuous/noncentralbeta.jl 100.00% <ø> (ø)
src/univariate/continuous/noncentralf.jl 90.00% <ø> (-1.67%) :arrow_down:
src/univariate/continuous/noncentralchisq.jl 90.00% <100.00%> (+2.00%) :arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov-commenter avatar Mar 18 '23 19:03 codecov-commenter

Thank you for the PR! I made some suggestions below. We should also make sure that everything is covered by the tests. In principle, the standard tests for univariate distributions include tests for sampling but maybe the distributions with Rmath-based sampling were explicitly excluded.

Not really sure on how to test the RNGs 😓

ArunS-tack avatar Mar 19 '23 14:03 ArunS-tack

We cannot add tests for NoncentralBeta till #1700 gets merged.

ArunS-tack avatar Mar 24 '23 05:03 ArunS-tack

What's left in the PR @ArunSanganal?

ayushpatnaikgit avatar Apr 14 '23 00:04 ayushpatnaikgit

What's left in the PR @ArunSanganal?

It should be good to merge if the tests added are satisfactory.

ArunS-tack avatar Apr 14 '23 06:04 ArunS-tack

It should be good to merge if the tests added are satisfactory.

I improved the tests. They were a bit redundant and even a bit worse than some existing tests, it seems. I increased the number of samples used in the standard tests as well.

devmotion avatar Apr 14 '23 07:04 devmotion

It says, counts are out of Confidence Interval. Where are we getting the values of Distribution parameters from? I am not able to reproduce the same for custom values.

ArunS-tack avatar Apr 14 '23 18:04 ArunS-tack

It says, counts are out of Confidence Interval. Where are we getting the values of Distribution parameters from? I am not able to reproduce the same for custom values.

The RNG isn't working, in that case. You should check your implementation carefully for any bugs, e.g. using the wrong parameters or parameter name.

In addition, you can try increasing the number of samples and changing the seed for the RNG to see if it might just be bad luck.

ParadaCarleton avatar Jul 25 '23 02:07 ParadaCarleton