Description Usage Arguments Details Value Author(s) See Also
Computes the attributions to predictions for a (given) number of dates at all possible sentiment dimensions, based on the coefficients associated to each sentiment measure, as estimated in the provided model object.
1 2 3 4 5 6 7 8 | attributions(
model,
sento_measures,
do.lags = TRUE,
do.normalize = FALSE,
refDates = NULL,
factor = NULL
)
|
model |
a |
sento_measures |
the |
do.lags |
a |
do.normalize |
a |
refDates |
the dates (as |
factor |
the factor level as a single |
See sento_model
for an elaborate modeling example including the calculation and plotting of
attributions. The attribution for logistic models is represented in terms of log odds. For binomial models, it is
calculated with respect to the last factor level or factor column. A NULL
value for document-level attribution
on a given date means no documents are directly implicated in the associated prediction.
A list
of class attributions
, with "documents"
, "lags"
, "lexicons"
,
"features"
and "time"
as attribution dimensions. The last four dimensions are
data.table
s having a "date"
column and the other columns the different components of the dimension, with
the attributions as values. Document-level attribution is further decomposed into a data.table
per date, with
"id"
, "date"
and "attrib"
columns. If do.lags = FALSE
, the "lags"
element is set
to NULL
.
Samuel Borms, Keven Bluteau
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.