JuliaMath / MeasureTheory.jl

"Distributions" that might not add to one.
MIT License
386 stars 32 forks source link

Suggested Parametrizations #104

Open ParadaCarleton opened 3 years ago

ParadaCarleton commented 3 years ago

A lot of distributions have reparametrizations of the form μ, ν where μ is the mean or scale, while ν represents the degrees of freedom. Examples are the Beta distribution written in terms of μ=α/(α+β) and ν=α+β, or the inverse gamma rewritten as the scaled inverse chi squared distribution (and similarly for gamma -> scaled chi squared distribution).

Another kind of reparametrization that would be extremely useful are the orthogonal parametrizations. In some cases, it's possible to rewrite a distribution of several variables as the product of two distributions, each of which only depends on one of the parameters. For instance, the gamma distribution can be rewritten in terms of the log of the geometric mean and the log of a scale parameter. Orthogonal parametrizations can help speed up some inference algorithms, can make setting priors or building models easier, and can help with communicating/visualizing/interpreting models by providing parameters that are independent (or approximately so).

cscherrer commented 3 years ago

Great point @ParadaCarleton , and thanks for the link!

A μ,ν parameterization for the Beta is a great idea, and StudentT also uses ν for degrees of freedom, so that works out nicely. I think in both cases we should have a df alias for the Greek-averse :)

Orthogonal parameterizations are great to have. Ideally we'd have a single approach to get to this that could be applied to every parameterized measure, but I don't see that it's so easy. So maybe we just take this case by case. Do you have a concrete suggestion for the gamma? I think the biggest question might be in choosing the best names for the parameters.

Speaking of parameterizations, I also want to get to quantile parameterizations. I think many users would find it convenient to be able to say e.g. Normal(q01=20, q99=30)

ParadaCarleton commented 3 years ago

Great point @ParadaCarleton , and thanks for the link!

A μ,ν parameterization for the Beta is a great idea, and StudentT also uses ν for degrees of freedom, so that works out nicely. I think in both cases we should have a df alias for the Greek-averse :)

Orthogonal parameterizations are great to have. Ideally we'd have a single approach to get to this that could be applied to every parameterized measure, but I don't see that it's so easy. So maybe we just take this case by case. Do you have a concrete suggestion for the gamma? I think the biggest question might be in choosing the best names for the parameters.

Speaking of parameterizations, I also want to get to quantile parameterizations. I think many users would find it convenient to be able to say e.g. Normal(q01=20, q99=30)

For the gamma, gMean and scale should be intuitive enough parameter names (taking logs isn't actually necessary, but logGeomMean and logScale work just as well). Quantile parametrizations be nice from a convenience perspective, but I'm somewhat hesitant about that since there's a lot of research showing that people are very bad at using them -- people asked to give 95% credible intervals tend to select intervals containing the correct answer about 50% of the time.