format_eta | R Documentation |
eta
For Input into fit_lda_c
There are a bunch of ways users could format eta
but the C++ Gibbs
sampler in fit_lda_c
only takes it one way. This function does the
appropriate formatting. It also returns errors if the user input a malformatted
eta
.
format_eta(eta, k, Nv)
eta |
the prior for words over topics. Can be a numeric scalar, numeric vector, or numeric matrix. |
k |
the number of topics. |
Nv |
the total size of the vocabulary as inherited from |
Returns a list with two elements: eta
and eta_class
.
eta
is the post-formatted version of eta
in the form of a
k
by Nv
numeric matrix. eta_class
is a character
denoting whether or not the user-supplied eta
was a "scalar",
"vector", or "matrix".
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.