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

Warn people away from this package #20

Closed
wants to merge 1 commit into from

Conversation

johnmyleswhite
Copy link
Member

We keep having people who believe this package is meant to be used by end-users and therefore are surprised it's not documented.

@@ -1,6 +1,6 @@
# StatsFuns

Mathematical functions related to statistics.
**A purely internal library for mathematical functions related to statistics that provides back-end machinery for the Distributions.jl package. End users should always use Distributions.jl and should never use this package under any circumstances.**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably change "and should never use this package under any circumstances" to simply "instead."

@simonster
Copy link
Member

The "Basic Functions" are not accessible through Distributions but still potentially useful. OTOH, many of them are one liners.

@ararslan
Copy link
Member

I believe @andreasnoack was saying that we should eventually just merge this into Distributions rather than having it as its own package.

While I think that's a good longer-term goal, currently some packages use StatsFuns as a medium for interfacing with the Rmath functions. Hopefully Rmath itself will eventually be phased out.

@simonster
Copy link
Member

The "Basic Functions" (xlogy, logistic, softmax, etc.) are potentially useful, but don't really make sense in Distributions (and many of them are not used there at all). If this package is not meant to be used by end users, we should either delete them and tell users to implement them themselves, or split this package into one that is meant to be used by end users and one that isn't.

@ararslan
Copy link
Member

ararslan commented Oct 25, 2016

We could put the useful things in StatsBase and the Distributions-specific stuff in Distributions.

@simonster
Copy link
Member

StatsBase sounds like a decent place to me.

@andreasnoack
Copy link
Member

@simonster We could move such functions to StatsBase. Mainly, I would like to avoid that people use the pdf,cdf functions here.

@ararslan
Copy link
Member

What about all of the constants we define here, like invπ and the like? Do those make sense in StatsBase as well? To me those seem like things people could just implement themselves as needed; I've honestly never quite understood why we have them.

@tpapp
Copy link
Contributor

tpapp commented Dec 8, 2016

I think there is a niche in the package ecosystem for implementing seemingly trivial one liners, some of which are nevertheless hard to get right, because of corner cases, numerical issues, or unfortunate combinations of the two. I learned this the hard way, isolating #22 took a good part of an afternoon. Also, while writing functions that do promotion and type stability right is not difficult in Julia, having a library which already took care of this safes effort.

Instead of warning users away from this package, I would suggest that it is renamed NumFuns or something similar, and becomes a repository of well-tested implementations for functions that fit the above description. Some of these are used in machine learning, some in statistics, some in science, so a more generic name would be better.

@andreasnoack
Copy link
Member

I think we all agree that it is useful to have these functions somewhere in a package. It just shouldn't be StatsFuns. StatsBase seemed to be the consensus. Somebody just has to do it.

@tpapp
Copy link
Contributor

tpapp commented Dec 8, 2016

So would a PR that just puts the contents of this library in StatsBase (in some organized manner) be useful? I could do it during the holidays.

@andreasnoack
Copy link
Member

andreasnoack commented Dec 8, 2016

...and deprecating it here. Yes, that would be very useful.

@tpapp
Copy link
Contributor

tpapp commented Dec 8, 2016

How would I deprecate it? Deprecate every exported function? Or are there facilities for deprecating an entire module?

@nalimilan
Copy link
Member

Wait, don't we want people to use most of these functions from Distributions.jl instead?

@ararslan
Copy link
Member

ararslan commented Dec 8, 2016

I thought we were going to divide the functions between StatsBase and Distributions as appropriate

@andreasnoack
Copy link
Member

I think the view was that functions like logistic and xlogx (probably all of misc.jl) seem to fit better in StatsBase than Distributions. The Rmath related stuff should go into Distributions.

The exported functions herethat we move, say foo, should be changed to something like @deprecate foo(x) StatsBase.foo(x).

@nalimilan
Copy link
Member

Maybe logistic, but I don't think we want to export all functions like nchisqinvlogccdf from StatsBase, right?

@andreasnoack
Copy link
Member

Functions like nchisqinvlogccdf shouldn't be exported anywhere. If it is a useful function, it should be covered by the API in Distributions.

@andreasnoack
Copy link
Member

Superseded by #85

@andreasnoack andreasnoack deleted the johnmyleswhite-patch-1 branch February 14, 2020 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants