Description Usage Arguments Details Examples
Calculate the topic entropy
1 | topic_entropy(x, prior = 0)
|
x |
a |
prior |
a smoothing constant to use (often alpha). Not currently implemented. |
Calculates the entropy over topics.
Assumes that of beta is set to 0 the probability 0 is the limit when p -> 0+ i.e 0.
1 2 3 4 | data("sotu50")
dtm <- doc_topic_matrix(sotu50)
H_0 <- topic_entropy(x = dtm)
H_doc <- topic_entropy(x = dplyr::group_by(dtm, doc))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.