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

Consider exporting StatsBase.sample from Statistics stdlib #32343

Closed
juliohm opened this issue Jun 17, 2019 · 7 comments
Closed

Consider exporting StatsBase.sample from Statistics stdlib #32343

juliohm opened this issue Jun 17, 2019 · 7 comments
Labels
domain:statistics The Statistics stdlib module stdlib Julia's standard library

Comments

@juliohm
Copy link
Sponsor Contributor

juliohm commented Jun 17, 2019

This is a feature request to consider exporting basic names such as sample defined in StatsBasefrom theStatistics` stdlib.

Right now whenever we need access to the sample function, we need this extra import, which seems suboptimal:

using Statistics # cool, we load anything related  to stats
using StatsBase # urgh, we still need this for sample, and other functions

It seems reasonable to reexport StatsBase from Statistics. That would solve a bunch of name-related issues:

The long-term solution is to move the code as well, but meanwhile, I think we could just reexport the names.

@KristofferC
Copy link
Sponsor Member

KristofferC commented Jun 17, 2019

StatsBase is not a part of the Julia stdlib so how can Statistics reexport the names?

Also, the general philosophy is to try move things out of the Julia repo so

The long-term solution is to move the code as well

would mean to move the code in Statistics to StatsBase.

@nickrobinson251
Copy link
Contributor

The long-term solution is to move the code as well

would mean to move the code in Statistics to StatsBase.

I'll note that there's still work on moving things in the direction StatsBase -> Statistics

@juliohm
Copy link
Sponsor Contributor Author

juliohm commented Jun 17, 2019

I am confused about the names. I thought that Statistics would be the de-facto name for anything statistics-related, so users of the language wouldn't need to care about this "*Base" business, and would just get the names with a single import.

There are multiple packages doing slightly different things:

  • StatsBase.jl
  • Statistics
  • StatsKit.jl

I understand that StatsKit.jl is broader and will reexport models, dataframes, etc. But the existence of StatsBase.jl together with Statistics is still confusing to me.

@juliohm
Copy link
Sponsor Contributor Author

juliohm commented Jun 17, 2019

Initially I thought that StatsBase.jl contained the foundations for stats-related work. Including all possible names. Then a package like Statistics would reexport all packages that implement the concepts.

Now I learned that StatsBase.jl is not even used by Statistics, I am not sure if these directions are clear to everyone.

@KristofferC
Copy link
Sponsor Member

Yeah, since StatsBase isn't used by Statistics there is nothing that can be reexported.

@nalimilan
Copy link
Member

StatsBase is supposed to be removed at some point, after its features have been moved either to Statistics or to more specific packages. Not sure which applies here.

@nalimilan nalimilan added domain:statistics The Statistics stdlib module stdlib Julia's standard library labels Jun 17, 2019
@juliohm
Copy link
Sponsor Contributor Author

juliohm commented Jun 17, 2019

That sounds like a good plan. Moving the functionality to either Statistics or some other specialized packages seems helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:statistics The Statistics stdlib module stdlib Julia's standard library
Projects
None yet
Development

No branches or pull requests

4 participants