-
Notifications
You must be signed in to change notification settings - Fork 421
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
Implement StatsAPI.pvalue
#1719
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #1719 +/- ##
==========================================
+ Coverage 85.82% 85.85% +0.03%
==========================================
Files 137 138 +1
Lines 8318 8337 +19
==========================================
+ Hits 7139 7158 +19
Misses 1179 1179
☔ View full report in Codecov by Sentry. |
@@ -0,0 +1,26 @@ | |||
using Distributions | |||
using StatsAPI: pvalue |
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.
Would it make sense to have Distributions reexport pvalue
? I'd be generally in favor but don't feel too strongly.
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.
Wouldn't this break HypothesisTests?
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.
Not after HypothesisTests extends pvalue
from StatsAPI.
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.
Sure, but all existing releases of HypothesisTests would suddenly be broken, wouldn't they? Certainly, this could be fixed by modifying the registry but I think this makes it less attractive to re-export pvalue
.
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'll merge and release without re-exporting pvalue
for now but this can be reconsidered and changed in a subsequent release if desired.
Co-authored-by: Alex Arslan <ararslan@comcast.net>
Currently
pvalue(::UnivariateDistribution, ...)
is defined in HypothesisTests and owned by HypothesisTests. However, when switching HypothesisTests to StatsAPI 1.6 which definesStatsAPI.pvalue
such definitions would be type piracy. Hence this PR adds them to Distributions.Note that StatsAPI is already an indirect dependency of Distributions via StatsBase, so this PR does not add packages to the dependency tree.
TODO: