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.
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.