-
Notifications
You must be signed in to change notification settings - Fork 11
move statsmodels.jl types and function stubs from StatsBase #4
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
Conversation
Thanks. I just have a doubt about:
Given that the implementations are very simple and based only on other methods defined in StatsAPI it may be OK to include them here (we also do this for some simple fallback implementations in DataAPI). Requiring a model to depend on StatsBase just to get @kleinschmidt Any opinion?
I think the idea is that packages should export functions that they actually use rather than blindly reexport the whole of StatsAPI. That's what we do with DataAPI. |
What's the motivation behind all the stub implementations that call |
There was no motivation, it's just the code from StatsBase.jl as-is. So this is a question of if we want to clean up the code during this PR. But yes it seems redundant, and |
@nalimilan I was looking to move the tests here too, but there don't seem to be any tests for those methods in StatsBase.jl? |
Yes we can drop all these
Right, the methods that we define should probably be tested. It doesn't have to happen in this PR, but if you feel like doing it that would be nice. |
Testing fundamental statistical methods probably isn't something you should entrust to me ;) I'll get the PR together minus errors, someone else can do a tests PR later. |
This should be ready to merge. I have the reciprocal PR to StatsBase.jl ready whenever this is registered. |
6907d3d
to
0021fe5
Compare
Well, given how simple the definitions are the risks of getting these wrong are limited. :-) We have correctness tests again R in GLM anyway, in StatsAPI we should just ensure that we don't introduce regressions in the future. |
Codecov Report
@@ Coverage Diff @@
## main #4 +/- ##
====================================
Coverage 0 0.00%
====================================
Files 0 2 +2
Lines 0 7 +7
====================================
- Misses 0 7 +7
Continue to review full report at Codecov.
|
Thanks! See JuliaRegistries/General#49094. |
Do you still plan to make PRs against StatsBase and StatsModels to import functions from StatsAPI? |
I had already updated and tested StatsBase.jl, just forgot to PR. But I haven't looked at StatsModels.jl, so if someone else wants to who knows the codebase that may be easier. |
Woops, we missed the definition of |
Oops... |
This PR moves
StatisticalModel
andRegressionModel
types, and most function stubs from statsmodels.jl in StatsBase to StatsAPI.bic
,aic
andaicc
are included hereas undocumented stubs in statisticalmodels.jl, the implementation and its specific documentation should probably remain in StatsBase.jl.with the full implementation, as its so small and genericparams
has been put in the main file as it was not defined for a specific type.I'm wondering if we should export all of these types and methods? The existing methods were not exported.
See JuliaStats/StatsBase.jl#726