View source: R/firststage_functions.R
nb_keywords | R Documentation |
Train a naive bayes classifier and extract keywords as data.frame object ordered by most predictive word of class on top (wrapper function around Quanteda commands). The returned data.frame has three columns: word, 0(=posterior prob of word indicating that document in classvar==0), 1(=posterior prob of word predicting word indicating that document in classvar==1), and id.
nb_keywords(training, classvar, distribution = "Bernoulli")
training |
Training data feature matrix |
classvar |
Classification variable name, entered as string |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.