View source: R/posterior.tidylda.R
generate_sample | R Documentation |
Helper function called by both posterior.tidylda and predict.tidylda to generate samples from the posterior.
generate_sample(dir_par, matrix, times)
dir_par |
matrix of Dirichlet hyperparameters, one column per |
matrix |
character of "theta" or "beta", indicating which posterior
matrix |
times |
Integer, number of samples to draw. |
Returns a tibble with one row per parameter per sample.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.