fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

Add special functions tests #207

Closed kMutagene closed 2 years ago

kMutagene commented 2 years ago

This PR will add tests for the following special functions:

implements #215 for erfcx, gamma, gammaLn, beta, betaLn, factorial, factorialLn,Binomial.coefficient, Binomial.coefficientLn

codecov-commenter commented 2 years ago

Codecov Report

Merging #207 (8582dd7) into developer (262f1ac) will increase coverage by 0.57%. The diff coverage is 96.22%.

@@              Coverage Diff              @@
##           developer     #207      +/-   ##
=============================================
+ Coverage      31.61%   32.19%   +0.57%     
=============================================
  Files            124      124              
  Lines          11664    11707      +43     
  Branches        1784     1786       +2     
=============================================
+ Hits            3688     3769      +81     
+ Misses          7535     7494      -41     
- Partials         441      444       +3     
Impacted Files Coverage Δ
src/FSharp.Stats/SpecialFunctions/Logistic.fs 100.00% <ø> (+100.00%) :arrow_up:
tests/FSharp.Stats.Tests/Main.fs 0.00% <0.00%> (ø)
src/FSharp.Stats/SpecialFunctions/Erf.fs 96.42% <75.00%> (+57.96%) :arrow_up:
src/FSharp.Stats/SpecialFunctions/Factorial.fs 88.88% <100.00%> (+88.88%) :arrow_up:
tests/FSharp.Stats.Tests/SpecialFunctions.fs 100.00% <100.00%> (ø)
src/FSharp.Stats/Fitting/Spline.fs 91.17% <0.00%> (-0.26%) :arrow_down:
src/FSharp.Stats/Array.fs 0.00% <0.00%> (ø)
...tats/ML/Unsupervised/PrincipalComponentAnalysis.fs 0.00% <0.00%> (ø)
src/FSharp.Stats/Ops.fs 4.00% <0.00%> (+0.15%) :arrow_up:
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 262f1ac...8582dd7. Read the comment docs.

kMutagene commented 2 years ago

@bvenn as this now also changes code usage of special functions in the distribution modules, i'd suggest to merge this first and rebase all other PRs from the hackathon that fix code on this. Double check for correct usage of e.g. _gamma instead of gamma in new commits.