generate_sample {tidylda} | 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.