-
Notifications
You must be signed in to change notification settings - Fork 18
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
Enable that location and scale parameters might be set or not used. #597
Enable that location and scale parameters might be set or not used. #597
Conversation
Test for discrete distributions that actually omit the scale parameter follow in another PR as they also need some other changes. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #597 +/- ##
==========================================
+ Coverage 80.12% 80.13% +0.01%
==========================================
Files 49 49
Lines 3064 3066 +2
==========================================
+ Hits 2455 2457 +2
Misses 609 609
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that the modifications done make sense. I simply suggest to add for the location (line 1039) the logic used for the scale with the try / except (line 1060-1062).
Co-authored-by: Mathias Hauser <mathause@users.noreply.github.com>
Some distributions do not use
loc
andscale
. While all distributions haveloc
as parameter, for some it might make sense to set it to 0 like the beta distribution or even just if one has calculated residuals for their data and knows the loc is 0. Thus, I implemented an option to set the location in the expression to a certain value (note because of #525 it can only be ints atm). Moreover, the discrete distributions tend to not have a scale parameter so I made it optional.CHANGELOG.rst