RandomState.dirichlet()
numpy.random.RandomState.dirichlet
-
RandomState.dirichlet(alpha, size=None)
-
Draw samples from the Dirichlet distribution.
Draw
size
samples of dimension k from a Dirichlet distribution. A Dirichlet-distributed random variable can be seen as a multivariate generalization of a Beta distribution. Dirichlet pdf is the conjugate prior of a multinomial in Bayesian inference.Parameters: alpha : array
Parameter of the distribution (k dimension for sample of dimension k).
size : int or tuple of ints, optional
Output shape. If the given shape is, e.g.,
(m, n, k)