[ot-users] How is implemented the Dirichlet distribution?
Vincent Dubourg
dubourg at phimeca.com
Mon Apr 14 16:32:50 CEST 2014
Hi list,
I can't find any properties matching the ones given on Wikipedia [1].
For instance, the components sum does not seem to be constant :
In [1]: import openturns as ot
In [2]: import numpy as np
In [3]: distribution = ot.Dirichlet([1. / 3. ] * 3)
In [4]: np.sum(distribution.getSample(10), axis=1)
Out[4]:
array([ 0.26889945, 0.95490551, 0.99871871, 0.80777841, 0.99881758,
0.01896246, 0.99137977, 0.7284044 , 0.88855046, 0.65154117])
The PDF expression does not match either [1, 2], but the distribution
has only n parameters on Wikipedia (the last one equals the sum of the
others) while it has n+1 in OpenTURNS.
Any help would be appreciated.
Thank you,
Vincent
[1] http://en.wikipedia.org/wiki/Dirichlet_distribution
[2]
http://doc.openturns.org/openturns-latest/html/UserManual_TUI/cid3.xhtml#uid1387
More information about the users
mailing list