Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Returning Interval instead of tuples in distributions' Support members #301

Merged
merged 9 commits into from
Sep 30, 2023

Conversation

valbers
Copy link

@valbers valbers commented Sep 30, 2023

This pull request introduces breaking changes.

Although these are just some small changes, they do represent breaking changes as the public contract of the Support members are changed.
The Supports of the exponential distribution and of the discrete negative binomial have also been fixed (were previously closed intervals, but they should have the right side "open").

Check list

  • The project builds without problems on my machine

  • Adapted unit tests regarding the added features

  Better fitting Support member without the superfluous lambda. Marking
the other Support member as obsolete.
Copy link
Member

@bvenn bvenn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution 🚀

Sadly the comments above the support members seems to be artifacts from copying it from the exponential distribution. Could you please update the /// description and check the comments I made in this PR?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like the support of the F distribution is dependent on the degrees of freedom used (dof1). At least here it says that its either [0,inf) or (0,inf) depending on dof1 beeing 1 or not. Do you have some thoughts if its correct to match dof1 beeing 0, or 1 respectively and then return different intervals?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point. Additionally, it seems that dof2 is irrelevant for determining the value of Support, so this parametert can be removed too.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume the description is an artifact from the exponential distribution (basically it says so in the /// comment) and the interval should be (0,inf). The same may apply to LogNormal

Reference

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because interval is -infinity, the interval should be open. Sorry about the misleading comments above each distribution support. Could you exchange exponential with the appropriate distribution discription for each distribution? If not, no worries I can take care of if, just let me know.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Sorry, it seems like I missed this one. But you're right, some of the current comments are not helping 😄

@codecov-commenter
Copy link

codecov-commenter commented Sep 30, 2023

Codecov Report

Merging #301 (3ae0bea) into developer (6014323) will increase coverage by 0.29%.
Report is 6 commits behind head on developer.
The diff coverage is 51.42%.

@@              Coverage Diff              @@
##           developer     #301      +/-   ##
=============================================
+ Coverage      46.31%   46.61%   +0.29%     
=============================================
  Files            148      148              
  Lines          16049    16182     +133     
  Branches        2176     2193      +17     
=============================================
+ Hits            7433     7543     +110     
- Misses          7968     7986      +18     
- Partials         648      653       +5     
Files Coverage Δ
src/FSharp.Stats/Distributions/Continuous/F.fs 57.62% <100.00%> (+3.08%) ⬆️
src/FSharp.Stats/Distributions/Continuous/Beta.fs 45.20% <0.00%> (ø)
src/FSharp.Stats/Distributions/Continuous/Chi.fs 26.08% <0.00%> (ø)
src/FSharp.Stats/Distributions/Continuous/Gamma.fs 56.38% <0.00%> (ø)
...FSharp.Stats/Distributions/Continuous/LogNormal.fs 8.00% <0.00%> (ø)
...rc/FSharp.Stats/Distributions/Continuous/Normal.fs 63.51% <0.00%> (ø)
.../FSharp.Stats/Distributions/Continuous/StudentT.fs 17.50% <0.00%> (ø)
...p.Stats/Distributions/Discrete/NegativeBinomial.fs 59.78% <0.00%> (ø)
...harp.Stats/Distributions/Continuous/Exponential.fs 0.00% <0.00%> (ø)
...ests/FSharp.Stats.Tests/DistributionsContinuous.fs 88.38% <55.55%> (-0.73%) ⬇️

... and 4 files with indirect coverage changes

@bvenn bvenn merged commit e8971fb into fslaborg:developer Sep 30, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update Support member for all probability distributions
3 participants