pangolin.interface.dirichlet#
- pangolin.interface.dirichlet(alpha)#
Create a simplex-valued Dirichlet RV (Wikipedia).
alphamust be a one-dimensional vector of positive concentrations. The result has the same shape and lies on the corresponding simplex. The IR validates the shape; positivity remains a backend-level constraint.Examples
>>> import pangolin.interface as pi >>> pi.dirichlet([1, 2, 3]).shape (3,)