Smooth predicted polarity scores by local polynomial regression.
smooth_lss(
x,
lss_var = "fit",
date_var = "date",
span = 0.1,
groups = NULL,
from = NULL,
to = NULL,
by = "day",
engine = c("loess", "locfit"),
...
)a data.frame containing polarity scores and dates.
the name of the column in x for polarity scores.
the name of the column in x for dates.
the level of smoothing.
specify the columns in x to smooth separately
by the group; the columns must be factor, character or logical.
the the range and the internal of the smoothed scores; passed to seq.Date.
specifies the function to be used for smoothing.
additional arguments passed to the smoothing function.
Smoothing is performed using stats::loess() or locfit::locfit().
When the x has more than 10000 rows, it is usually better to choose
the latter by setting engine = "locfit". In this case, span is passed to
locfit::lp(nn = span).