JuliaStats / Distributions.jl

A Julia package for probability distributions and associated functions.
Other
1.1k stars 414 forks source link

Define a functiuon on Multivatate Distributions to marginalize out some variates #1238

Open oxinabox opened 3 years ago

oxinabox commented 3 years ago

I propose that that we should have a function on multivariate distribitions that marginalizes out variates/ For example going from a 3D Multivariate to a 2D one.

Marginalizing is probably not trivially defined on all multivariate distributions. But it is defined on MvNormal and GenericMvTDist where you can basically just drop the relevent rows/columns from the matrixes that live behind it. Invenia currently has some internal code for this that i can open source.

ElOceanografo commented 3 years ago

There's been some discussion of similar ideas in Turing: https://github.com/TuringLang/Turing.jl/issues/1382 https://github.com/TuringLang/Turing.jl/issues/976 https://github.com/TuringLang/DynamicPPL.jl/issues/94