bayesplain.core.dirichlet_multinomial.posterior_cell_draws¶
-
bayesplain.core.dirichlet_multinomial.posterior_cell_draws(table, concentration=
1.0, size=100000, rng=None)[source]¶ Draw whole tables of cell probabilities from the Dirichlet posterior.
With a
Dirichlet(a)prior over the full set of cells, the posterior isDirichlet(a + counts)– conjugate, so again just adding counts to concentration parameters. Each draw is a complete table of probabilities summing to one, so any quantity computed from a table can be computed once per draw to get its posterior distribution.