haskell-numerics / random-fu

A suite of Haskell libraries for representing, manipulating, and sampling random variables
42 stars 21 forks source link

Uniform distribution over the standard simplex #30

Closed mnacamura closed 8 years ago

mnacamura commented 9 years ago

I prepared Data.Random.Distribution.Simplex, which provides a class of uniform distribution over the standard simplex. The standard simplex of dimension k is defined by { (_x0, _x1, ..., _xk) | _xi >= 0 for all i, sum _xi = 1 }. Using this module, one can get a random sample of positive real values where its sum is 1. This is useful when, for example in a context of Bayesian statistics, one wants to initialize a prior (discrete) distribution uniformly at random.

idontgetoutmuch commented 9 years ago

@mnacamura I only just noticed this. I hope to look at it over the next week. Sorry it has taken so long.