Description Usage Arguments Value Joined value columns Examples
View source: R/ts_normalization.R
Normalize univariate timeseries
1 2 3 4 5 6 7 8 | ts_normalization(
data,
length_val,
length_test,
value_col = "value",
joined = TRUE,
metrics = FALSE
)
|
data |
univariate time series (data.frame / data.table) |
length_val |
length for validation set |
length_test |
length for test set |
value_col |
column(s) to normalize, searched by starting pattern. E.g.
|
joined |
joined normalization for same pattern? TRUE by default. See section "Joined value columns" for details |
metrics |
return data only or list of data and metrics? |
Depending on metrics
, processed DT object or list of "data" and
"metrics" (center and scale)
Joined means to normalize all columns detected by pattern with the one column
exactly matching. Watch out for this condition to hold if joined = TRUE
.
joined
is of particular use for lagged time series. E.g. column "value"
should be used to normalize not only column "value" but also "value_lag1" etc.
1 2 3 4 5 | # without metrics
DT_norm <- ts_normalization(tsRNN::DT_apple, 10, 10); DT_norm
# with metrics
ts_normalization(tsRNN::DT_apple, 10, 10, metrics = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.