quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
144 stars 22 forks source link

Support for multivariate distributions #3321

Open rafaelkaufmann opened 1 week ago

rafaelkaufmann commented 1 week ago

Description of suggestion or shortcoming:

From perusing the documentation and trying out various things, Squiggle seems to be missing support for multivariate distributions, which makes a lot of things awkward or impossible :)

OAGr commented 1 week ago

Yep, we've been thinking about this. It definitely gets tricky, as JS doesn't seem to have good libraries with multivariate support, but we could probably add some simpler options.

Can you be more specific about the functionality you'd want?

I know that often multivariate normals or other simple multivariates are used, maybe we could get far with just a few multivariate structures. I'm not an expert here.

rafaelkaufmann commented 1 week ago

Given that this is just for forward estimation/prediction (new FR forthcoming!), multivariate normals would indeed be sufficient. One can get a multivariate normal from a vector of independent normal scalar RVs by matrix multiplication, but this is also missing ;)

OAGr commented 1 week ago

Yea, matrix operations are something I'd like to provide basic support for, but it's definitely more work.

We are a small nonprofit doing most of this with a currently-small market size. There's definitely a lot of improvements we'd like to make!