lscore | R Documentation |
lscore
provides a diagnostic score
for evaluating the derived load shape in
retaining time series properties.
lscore(ls, type = "acf", output = 2, lag = NULL)
ls |
An object of class |
type |
Type of correlation to be
evaluate, either |
output |
Type of output to be used, either 1 or 2;
uses |
lag |
Maximum lag at which to calculate the acf or pacf.
Same as |
The diagnostic measure is calculated as a weighted mean absolute percent error (MAPE) of auto correlation or partial auto correlation values of the derived series with respect to the original. The values are calculated for given lag. Lag = 0 is omitted from calculation for auto correlation as it would be always 1. If o_i and d_i are the correlation values of original and derived load shape at lag i, then weighted MAPE is calculated as
wmape = ∑ _{i=1}^{lag} { w_i * |(o_i - d_i) / o_i|}
where w_i = \frac{|o_i|}{∑ _{i=1}^{lag}|o_i|}
Since wmape
is a measure of error, lower value
indicates better preservation of time
series property.
A list of the followings:
wmape
: Weighted MAPE.
lag
: Lags at which ACF or PACF
values were evaluated and used in calculating wmape
.
type
: Type of Correlation (ACF or PACF)
cor_x
: ACF/PACF values of the original load.
cor_y
: ACF/PACF values of the derived load.
weight
: Weights at different lags used to
calculate wmape
.
loads <- ercot[ercot$Year == 2019, ]$COAST linear_loadshape <- lslin(loads, target_lf = 0.4) # -------------- scores_1 <- lscore(linear_loadshape, type = "acf", lag = 20) print(scores_1) # -------------- scores_2 <- lscore(linear_loadshape, type = "pacf") print(scores_2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.