stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

Probability Distribution and Statistical Functions -- Gamma Distribution Module

Open Jim-215-Fisher opened this issue 4 years ago • 4 comments

This is the second round of probability distribution and statistical functions, continuing from #240. Since the whole modular structure has been changed, each distribution will have its own PR. This PR contains gamma distributions. Files uploaded are:

  • src/stdlib_stats_distribtuion_gamma.fypp
  • src/CMakeLists.txt
  • src/tests/test_distribution_gamma.f90
  • src/tests/CMakeLists.txt
  • doc/specs/stdlib_stats_distribution_gamma.md
  • doc/specs/index.md

Link to the open-access article on which this PR is based. P.369 (7/10) has a summary of the final algorithm.

Jim-215-Fisher avatar Dec 22 '20 16:12 Jim-215-Fisher

This one is ready for review.

Jim-215-Fisher avatar Jun 20 '22 18:06 Jim-215-Fisher

Compilation failed due to Build-API-Docs failure of other modules. Error message is AttributeError: 'FortranSubmoduleProcedure' object has no attribute 'module'. What does that mean?

Jim-215-Fisher avatar Aug 11 '22 01:08 Jim-215-Fisher

@Jim-215-Fisher it looks related to the ford issue ford#466. Apart from that, this PR is LGTM. The only thing I'm unsure about it is: How was your approach to testing, and where did you get the expected output?

14NGiestas avatar Aug 12 '22 05:08 14NGiestas

Thank you for the info. Regarding the testing, gamma random number is tested with common Pearson's chi-squared test, pdf and cdf were tested against results from scipy or excel formula with the same parameters.

@Jim-215-Fisher it looks related to the ford issue ford#466. Apart from that, this PR is LGTM. The only thing I'm unsure about it is: How was your approach to testing, and where did you get the expected output?

Jim-215-Fisher avatar Aug 14 '22 01:08 Jim-215-Fisher