Shows a plot of the attributions along the dimension provided, stacked per date.
plot_attributions(attributions, group = "features")
an output from a retrieve_attributions
call.
a value from c("lexicons", "features", "time")
.
Returns a simple ggplot
object, which can be added onto (or to alter its default elements) by using
the +
operator (see examples). By default, a legend is positioned at the top if the number of components of the
dimension (thus, individual line graphs) is at maximum twelve.
See sento_model
for an elaborate modelling example including the calculation and plotting of
attributions. This function does not handle the plotting of the attribution of individual documents, since there are
often a lot of documents involved and they appear only once at one date (even though a document may contribute to
predictions at several dates, depending on the number of lags in the time aggregation).