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

Function to discretize distributions?

Open GBarnsley opened this issue 5 months ago • 0 comments

See here for an R implementation of this idea. Is there space for a similar function in Distributions?

I've put together a package built on top of Distributions here that does this. Roughly, it converts univariate distributions into a DiscreteNonParameteric based on evenly (or custom) intervals. I find this useful for modelling purposes, i.e. if you are modelling in discrete time, often a DiscreteNonParameteric is faster and more convenient than binning continuous outputs.

Wanted to check if this would be better as a utility in Distributions? Might need to take a different approach to my packge, which has a strong dependancy on IntervalArithmetic.

GBarnsley avatar Jul 28 '25 19:07 GBarnsley