View source: R/stylest2_select_vocab.R
stylest2_terms | R Documentation |
A function to select terms for inclusion in a stylest2 model, based on a document-feature matrix of texts to predict and a specified cutoff.
stylest2_terms(dfm, cutoff)
dfm |
a quanteda |
cutoff |
a single numeric value - the quantile of term frequency under which to drop terms. |
A character vector of terms falling above the term frequency cutoff.
data(novels_dfm)
best_cut <- stylest2_select_vocab(dfm=novels_dfm)
stylest2_terms(dfm = novels_dfm, cutoff=best_cut$cutoff_pct_best)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.