calc_lambda | R Documentation |
Use Bayes' rule to get P(topic|token) from the estimated parameters of a
probabilistic topic model.This resulting "lambda" matrix can be used for
classifying new documents in a frequentist context and supports
augment
.
calc_lambda(beta, theta, p_docs = NULL, correct = TRUE)
beta |
a beta matrix |
theta |
a theta matrix |
p_docs |
A numeric vector of length |
correct |
Logical. Do you want to set NAs or NaNs in the final result to
zero? Useful when hitting computational underflow. Defaults to |
Returns a matrix
whose rows correspond to topics and whose columns
correspond to tokens. The i,j entry corresponds to P(topic_i|token_j)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.