Open nilsbecker opened 9 months ago
I think those are nice suggestions! It's true the choice of distributions is a bit thin right now.
combinators to make random vectors with independent but not identically distributed components from existing distributions
Do you have something in mind API-wise for this one? We could either introduce tupN : 'a1 t * ... * 'aN t -> ('a1 * ... * 'aN) t
for N = 1,2,3,4...K
with K
fixed, or if we don't care about having heterogeneous types something like vector : int -> (int -> 'a t) -> 'a array t
potentially, a simpler way to make vectors with independent uniform components with componentwise different support.
Same question, if you have a signature in mind (or can point me to something existing elsewhere) that'd be great!
hmm, i think allowing different types in different dimensions could be useful for a case of discrete x continuous data. so i like the tupN
type better i think. maybe both?
for the rectangular one, probably the vector
type is sufficient and easier.
Part of this seems like an easy improvement, I'll try to get to that soon.
For the multidimensional gaussian, it's not so clear I can get something efficient in a short amount of time. There is code that has been written by much better numerical experts than I so I should probably find some good MIT-licensed implementation.
I added some rectangle
and tupN
combinators for Gen
and Pdfs
:
it would be nice to have some basic support for multidimensional distributions. i can think of
this would already be useful -- maybe there is something else that is equally basic?