Dynamic Time Warping Variable Importance Analysis of Multivariate Time Series Lists
Source:R/momentum_dtw.R
momentum_dtw.Rd
Minimalistic but slightly faster version of momentum()
to compute dynamic time warping importance analysis with the "robust" setup in multivariate time series lists.
Arguments
- tsl
(required, time series list) list of zoo time series. Default: NULL
- distance
(optional, character vector) name or abbreviation of the distance method. Valid values are in the columns "names" and "abbreviation" of the dataset distances. Default: "euclidean".
Value
data frame:
x
: name of the time seriesx
.y
: name of the time seriesy
.psi
: psi score ofx
andy
.variable
: name of the individual variable.importance
: importance score of the variable.effect
: interpretation of the "importance" column, with the values "increases similarity" and "decreases similarity".
See also
Other momentum:
momentum()
,
momentum_ls()
Examples
tsl <- tsl_initialize(
x = distantia::albatross,
name_column = "name",
time_column = "time"
) |>
tsl_transform(
f = f_scale_global
)
df <- momentum_dtw(
tsl = tsl,
distance = "euclidean"
)
#focus on important columns
df[, c(
"x",
"y",
"variable",
"importance",
"effect"
)]
#> x y variable importance effect
#> 1 X132 X134 x 87.6066043 decreases similarity
#> 2 X132 X134 y 93.9587187 decreases similarity
#> 3 X132 X134 speed -21.9171171 increases similarity
#> 4 X132 X134 temperature 72.8121621 decreases similarity
#> 5 X132 X134 heading -38.0165137 increases similarity
#> 6 X132 X136 x 48.3845903 decreases similarity
#> 7 X132 X136 y 93.5214543 decreases similarity
#> 8 X132 X136 speed -61.1729252 increases similarity
#> 9 X132 X136 temperature 356.8824838 decreases similarity
#> 10 X132 X136 heading -102.9830173 increases similarity
#> 11 X132 X153 x 427.7381576 decreases similarity
#> 12 X132 X153 y 156.1285451 decreases similarity
#> 13 X132 X153 speed -40.9249630 increases similarity
#> 14 X132 X153 temperature -14.2831545 increases similarity
#> 15 X132 X153 heading -79.3532025 increases similarity
#> 16 X134 X136 x 61.3361468 decreases similarity
#> 17 X134 X136 y 108.9650664 decreases similarity
#> 18 X134 X136 speed -59.2603918 increases similarity
#> 19 X134 X136 temperature 310.6812842 decreases similarity
#> 20 X134 X136 heading -90.2797292 increases similarity
#> 21 X134 X153 x 592.0783167 decreases similarity
#> 22 X134 X153 y 116.4310429 decreases similarity
#> 23 X134 X153 speed -52.4149093 increases similarity
#> 24 X134 X153 temperature 0.9936944 decreases similarity
#> 25 X134 X153 heading -85.0271172 increases similarity
#> 26 X136 X153 x 507.6153648 decreases similarity
#> 27 X136 X153 y 56.6957442 decreases similarity
#> 28 X136 X153 speed -65.4516103 increases similarity
#> 29 X136 X153 temperature 240.9053814 decreases similarity
#> 30 X136 X153 heading -116.2461929 increases similarity