View source: R/stylest2_predict.R
posterior | R Documentation |
Generate the posterior likelihood of speaker given their rates and predicted dfm frequencies.
posterior(log_weights, pred_docs_dfm, speakers, log_prior)
log_weights |
The logged author-level term weights from a stylest2 model. |
pred_docs_dfm |
A document-feature matrix for the texts to be predicted. |
speakers |
The speaker labels for |
log_prior |
A vector of log prior probabilities. |
The posterior likelihoods of authorship for prediction texts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.