Clusters a time series using dtwclust::tsclust
.
The number of clusters is tunable with k
. Additional parameters
can be set using options
.
Adds a single column to new data (per input column), with integers 1-k identifying the cluster.
step_dtw( recipe, ..., role = "predictor", trained = FALSE, k = 4, dtwclust = NULL, options = list(), skip = FALSE, id = recipes::rand_id("dtw") )
recipe | A recipe object. The step will be added to the sequence of operations for this recipe. |
---|---|
... | One or more selector functions to choose which
variables are affected by the step. See |
role | For model terms created by this step, what analysis role should they be assigned?. By default, the function assumes that the new columns created from the original variables will be used as predictors in a model. |
trained | A logical to indicate if the quantities for preprocessing have been estimated. |
k | The number of clusters, tunable. |
dtwclust | A list of |
options | A list of options for |
skip | A logical. Should the step be skipped when the
recipe is baked by |
id | A character string that is unique to this step to identify it. |