View source: R/create-dtw-grids.R
create_dtw_grids | R Documentation |
dtwclust
and dtw
distance functionscreate_dtw_grids()
creates a nested, parameter grid list for dtwclust and dtw distance functions to be used in dtw_dist_gridsearch()
.
create_dtw_grids(params)
params |
A named list of parameter name-value pairs. The names should be the names of the distance functions that correspond to the parameter name-value pairs. |
Named, nested list where each element is a list of elements that represent each possible configuration for the parameters of that distance function.
params_ls_lg <- list(dtw_basic = list(window.size = 5:10,
norm = c("L1", "L2"),
step.pattern = list(dtw::symmetric1, dtw::symmetric2)),
dtw2 = list(step.pattern = list(dtw::symmetric1, dtw::symmetric2),
window.size = 5:10),
dtw_lb = list(window.size = 5:10,
norm = c("L1", "L2"),
dtw.func = "dtw_basic",
step.pattern = list(dtw::symmetric2)),
sbd = list(znorm = TRUE, return.shifted = FALSE),
gak = list(normalize = TRUE, window.size = 5:10))
dtw_grids_lg <- create_dtw_grids(params_ls_lg)
str(dtw_grids_lg$dtw_basic[1:4])
# Can still be ran with a minimal "grid"
params_ls_sm <- list(dtw2 = list(step.pattern = list(dtw::symmetric1)))
dtw_grids_sm <- create_dtw_grids(params_ls_sm)
head(dtw_grids_sm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.