View source: R/textplot_influence.R
| textplot_influence | R Documentation |
Plot the results of a fitted scaling model, from (e.g.) a predicted textmodel_affinity model.
textplot_influence(x, n = 30, ...)
x |
the object output from |
n |
the number of features whose influence will be plotted |
... |
additional arguments passed to |
Creates a base R plot of feature influences of the median influence
by the log10 median rate of the feature, and invisibly returns the elements
from the call to plot().
Patrick Perry and Kenneth Benoit
textmodel_affinity()
influence.predict.textmodel_affinity()
tmod <- textmodel_affinity(quanteda::data_dfm_lbgexample, y = c("L", NA, NA, NA, "R", NA))
pred <- predict(tmod)
textplot_influence(influence(pred))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.