Menu

#759 Add more random number distributions

v1.1.x
closed
v1.1.5
New Functionality
2023-02-20
2022-11-11
Erik Hänel
No

Add more random number distributions to the list of functions as well as some of the additional helper functions as those used within the ANOVA in [#756], Here's a reference https://www.gnu.org/software/gsl/doc/html/randist.html

Analysis:

Has to be implemented as every numerical function in kernel/core/maths/functionimplementation.cpp (export in functionimplementation.hpp and register in NumeReKernel::defineFunctions(). Note that, if a function is not random-number based or based upon some global state (like sleep()), it should be registered as optimizable (the third parameter, which is now a thing).

Implementation:

  • Implementation: Implemented Laplace, Cauchy, Rayleigh, Landau, Levy (alpha stable), Fisher f and Student t distributions
  • Revision: [r1328]
  • Implementation test: Ran a high number of tests with random input values and checked for program crashes. Runs stable. Tested few random values for expected output values.

Documentation:

  • [x] ChangesLog updated
  • [x] Code changes commented
  • Documentation articles:
    • [ ] corresponding documentation articles updated
    • [ ] new documentation articles created
    • [x] not needed
  • Language files:
    • [x] corresponding language files updated
    • [ ] not needed

Tests:

New functions were added to the automatic SW tests. No deviation detected.

Related

Commit: [r1328]
Tickets: #756

Discussion

  • Erik Hänel

    Erik Hänel - 2022-11-11

    A naming convention might reduce the noise of the newly added functions, e.g. rd_* for random distributions, cdf_* for the cumulative distribution functions and inv_cdf_* for their inverse. Example: rd_fisher_f(x,p,q), cdf_fisher_f(...) and inv_cdf_fisher_f(...)

     
  • Erik Hänel

    Erik Hänel - 2022-11-16
    • labels: --> function, internal
    • status: open --> accepted
     
  • Erik Hänel

    Erik Hänel - 2022-11-16
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     Add more random number distributions to the list of functions as well as some of the additional helper functions as those used within the ANOVA in [#756], Here's a reference https://www.gnu.org/software/gsl/doc/html/randist.html
    +
    +###Analysis:
    +(*Describe, what's the issue and which changes have to be made*)
    +
    +###Implementation:
    +* Implementation: (*Describe, what you've changed*) 
    +* Revision: [rXXX]
    +* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +
    +###Documentation:
    +* [ ] ChangesLog updated
    +* [ ] Code changes commented
    +* **Documentation articles:**
    
    +    * [ ] corresponding documentation articles updated
    +    * [ ] new documentation articles created
    +    * [ ] not needed
    +* **Language files:**
    +    * [ ] corresponding language files updated
    +    * [ ] not needed
    +
    +###Tests:
    +(*Describe, which tests you performed and their outcome*)
    
    • status: accepted --> analyzing
     

    Related

    Tickets: #756

  • Erik Hänel

    Erik Hänel - 2022-11-28
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,7 +1,7 @@
     Add more random number distributions to the list of functions as well as some of the additional helper functions as those used within the ANOVA in [#756], Here's a reference https://www.gnu.org/software/gsl/doc/html/randist.html
    
     ###Analysis:
    -(*Describe, what's the issue and which changes have to be made*)
    +Has to be implemented as every numerical function in `kernel/core/maths/functionimplementation.cpp` (export in `functionimplementation.hpp` and register in `NumeReKernel::defineFunctions()`. Note that, if a function is not random-number based or based upon some global state (like `sleep()`), it should be registered as optimizable (the third parameter, which is now a thing).
    
     ###Implementation:
    
     * Implementation: (*Describe, what you've changed*) 
    
    • status: analyzing --> implementing
    • assigned_to: Erik Hänel --> Raphael Zehner
     

    Related

    Tickets: #756

  • Raphael Zehner

    Raphael Zehner - 2023-02-15
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,19 +4,19 @@
     Has to be implemented as every numerical function in `kernel/core/maths/functionimplementation.cpp` (export in `functionimplementation.hpp` and register in `NumeReKernel::defineFunctions()`. Note that, if a function is not random-number based or based upon some global state (like `sleep()`), it should be registered as optimizable (the third parameter, which is now a thing).
    
     ###Implementation:
    -* Implementation: (*Describe, what you've changed*) 
    -* Revision: [rXXX]
    -* Implementation test: (*Describe the type of test, which you performed, and if it was successful*)
    +* Implementation: Implemented Laplace, Cauchy, Rayleigh, Landau, Levy (alpha stable), Fisher f and Student t distributions
    +* Revision: [r1328]
    +* Implementation test: Ran a high number of tests with random input values and checked for program crashes. Runs stable. Tested few random values for expected output values. 
    
     ###Documentation:
    -* [ ] ChangesLog updated
    -* [ ] Code changes commented
    +* [x] ChangesLog updated
    +* [x] Code changes commented
    
     * **Documentation articles:**
         * [ ] corresponding documentation articles updated
         * [ ] new documentation articles created
    -    * [ ] not needed
    +    * [x] not needed
     * **Language files:**
    -    * [ ] corresponding language files updated
    +    * [x] corresponding language files updated
         * [ ] not needed
    
     ###Tests:
    
    • status: implementing --> testing
    • assigned_to: Raphael Zehner --> Erik Hänel
     

    Related

    Commit: [r1328]

  • Erik Hänel

    Erik Hänel - 2023-02-20
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -20,4 +20,4 @@
    
         * [ ] not needed
    
     ###Tests:
    -(*Describe, which tests you performed and their outcome*)
    +New functions were added to the automatic SW tests. No deviation detected.
    
    • status: testing --> closed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB