Distributions.jl icon indicating copy to clipboard operation
Distributions.jl copied to clipboard

Request/Interest Empirical Distribution type similar to DiscreteNonParametric

Open davibarreira opened this issue 3 years ago • 5 comments

I'm opening this issue to see if the maintainers of this package are interested in a implementation of a Empirical Distribution type, similar to DiscreteNonParametric, but allowing the support to be multidimensional. I saw that there was a very old issue #358 where the user requested this, but there was no follow up.

I can see many situations where having this distribution could be useful. One example is in the package OptimalTransport.jl, where we make use of DiscreteNonParametric for the 1-D cases, but for multidimensional cases we have to use separate variables for the support and the probabilities. Other examples would be for performing sampling or bootstraping in datasets.

If there is interest in this new distribution, I could try implementing it.

davibarreira avatar Jun 02 '21 18:06 davibarreira

The discussion in https://github.com/alan-turing-institute/MLJBase.jl/issues/504 seems related.

devmotion avatar Jun 02 '21 18:06 devmotion

If Distributions doesn't work out, we're very interested in more general distributions like this for MeasureTheory.jl

cscherrer avatar Oct 20 '21 17:10 cscherrer

I have to take a look at MeasureTheory.jl. I find the project fascinating, but still haven't found an "excuse" to dive into it. But I'd be glad to contribute.

davibarreira avatar Oct 20 '21 17:10 davibarreira

I toyed with this concept a few months ago, and I still have some leftover code for a MultivariateCategorical, which is almost the same. Ping me if you want it!

gdalle avatar Oct 21 '21 10:10 gdalle

Ideally this should handle more general support types and not only multivariate or univariate variables if we generalize it.

devmotion avatar Oct 21 '21 10:10 devmotion