StatsBase.jl
StatsBase.jl copied to clipboard
Move `predict` to StatsAPI.jl
I would like to support predict in GeoData.jl for e.g. predicting SDM models over stacks of raster layers, without the round trip to DataFrame and back.
But StatsBase is pretty heavy for a base package, withe nearly a second load time, and GeoData.jl is only loosely related to stats models.
Would it be acceptable to move predict to StatsAPI.jl with StatsBase keeping the fallback definition?
Yes, actually we should move all empty definitions in statsmodel.jl to StatsAPI. Feel free to make a PR.
By "all empty definitions" do you mean that e.g.
coef(model::StatisticalModel) = error("coef is not defined for $(typeof(model)).")
Would also move to StatsAPI as:
coef(model) = error("coef is not defined for $(typeof(model)).")
I'd move coef(model::StatisticalModel) without changing its signature. Any reason to change it?
Because the types are defined here ;)
We can move the them too, of course. I just have no idea about the design of these packages.
Yes we should move them too. There's no reason to force a package that wants to use these types to depend on StatsBase.
This is done, would it be possible to review the changes over at StatsAPI?
When that is approved/merged I'll make the PR to remove the stubs here and import them from StatsAPI.