francescoalemanno / KissABC.jl

Pure julia implementation of Multiple Affine Invariant Sampling for efficient Approximate Bayesian Computation
MIT License
29 stars 8 forks source link

Factored prior over multivariate distributions #31

Open zsteve opened 2 years ago

zsteve commented 2 years ago

Thanks for this package! At the moment, the Factored distribution only applies to UnivariateDistributions. Is there any reason currently the code does not support MultivariateDistribution?

The reason I am interested here is that I would like to estimate transition matrices using ABC. In this setting, the appropriate choice of prior would be a Dirichlet distribution for each row of the transition matrix. Then the prior over transition matrices should be something like

Factored([Dirichlet(zeros(N)) for _ in eachrow(P)]).

As a hack, I've just extended the Factored type to allow MultivariateDistribution. This seems to work as-is. Would be curious to see whether this is something that can be incorporated into the package. https://github.com/zsteve/KissABC.jl/tree/multivariatefactor

francescoalemanno commented 2 years ago

Hi steve, open up a PR and add a few tests for the various sampling strategies :) I will be very glad to take a look at your improvements