[ANN] StatsFuns & refactoring of StatsBase & Distributions

218 views
Skip to first unread message

Dahua Lin

unread,
Jul 26, 2015, 11:47:59 AM7/26/15
to julia-stats
In the past several days, I did some refactoring of StatsBase & Distributions packages. The primary purpose is to decouple higher-level stuff and low-level computational routines. 

Specifically, I created a new package StatsFuns:


This package provides a set of numerical routines for statistical computing -- the implementations of these functions are either migrated from StatsBase or Distributions, or delegated to Rmath. With this refactoring, Distributions is depending on StatsFuns, while the efforts of replacing Rmath functions will happen in StatsFuns. In this way, contributors of these two packages will focus on different aspects of the development.

Ultimately, the role of StatsFuns to JuliaStats would be similar to the role of Rmath to R. 

Also, if you have a package that requires certain stats functions (instead of full-fledged distributions), you can have the package depend on StatsFuns instead of Distributions.

For backward compatibility, several functions (e.g. logistic, logit, logsumexp, softmax, etc) are imported from StatsFuns to StatsBase, and re-exported therefrom. We will consider removing these functions from StatsBase in future. So if you are using these functions, please do `using StatsFuns`. 

Cheers,
Dahua




Dahua Lin

unread,
Jul 26, 2015, 12:39:26 PM7/26/15
to julia-stats, lind...@gmail.com
Note that these changes are completely backward compatible. It is internal restructuring, and all client codes should work as before.

Andreas Noack

unread,
Jul 27, 2015, 10:41:58 AM7/27/15
to julia...@googlegroups.com
Great work. I think it makes perfect sense to have these factored out.

My only minor comment is that I'd preferred Functions to Funs.

--
You received this message because you are subscribed to the Google Groups "julia-stats" group.
To unsubscribe from this group and stop receiving emails from it, send an email to julia-stats...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Amelio Vazquez-Reina

unread,
Jul 27, 2015, 12:53:47 PM7/27/15
to julia...@googlegroups.com
Thank you Dahua -- This is great. 

Also +1 for StatsFunctions.

Amelio

Stefan Karpinski

unread,
Jul 27, 2015, 2:17:29 PM7/27/15
to julia...@googlegroups.com
This seems like a good change but it would be better to get some consensus on this kind of massive refactoring beforehand. Can you summarize what you changed here and what the issues with the old approaches were?

Dahua Lin

unread,
Jul 28, 2015, 1:25:42 PM7/28/15
to julia-stats, stefan.k...@gmail.com
Actually, the refactoring is quite moderate. 

Basically, I moved some low-level computational routines and Rmath functions to StatsFuns (Distributions then import them from StatsFuns), and did some minor clean-up. The readme of StatsFuns provides the list of functions.
Reply all
Reply to author
Forward
0 new messages