textplot_influence {quanteda.textmodels} | R Documentation |
Influence plot for text scaling models
Description
Plot the results of a fitted scaling model, from (e.g.) a predicted textmodel_affinity model.
Usage
textplot_influence(x, n = 30, ...)
Arguments
x |
the object output from |
n |
the number of features whose influence will be plotted |
... |
additional arguments passed to |
Value
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()
.
Author(s)
Patrick Perry and Kenneth Benoit
See Also
influence.predict.textmodel_affinity()
Examples
tmod <- textmodel_affinity(quanteda::data_dfm_lbgexample, y = c("L", NA, NA, NA, "R", NA))
pred <- predict(tmod)
textplot_influence(influence(pred))
[Package quanteda.textmodels version 0.9.9 Index]