(C++) Psi Dissimilarity Score of Two Time-Series
Source:R/RcppExports.R
psi_dynamic_time_warping_cpp.Rd
Computes the psi score of two time series y
and x
with the same number of columns.
NA values should be removed before using this function.
If the selected distance function is "chi" or "cosine", pairs of zeros should
be either removed or replaced with pseudo-zeros (i.e. 0.00001).
Usage
psi_dynamic_time_warping_cpp(
x,
y,
distance = "euclidean",
diagonal = TRUE,
weighted = TRUE,
ignore_blocks = FALSE,
bandwidth = 1
)
Arguments
- x
(required, numeric matrix) of same number of columns as 'y'.
- y
(required, numeric matrix) time series.
- distance
(optional, character string) distance name from the "names" column of the dataset
distances
(seedistances$name
). Default: "euclidean".- diagonal
(optional, logical). If TRUE, diagonals are included in the computation of the cost matrix. Default: FALSE.
- weighted
(optional, logical). If TRUE, diagonal is set to TRUE, and diagonal cost is weighted by a factor of 1.414214. Default: FALSE.
- ignore_blocks
(optional, logical). If TRUE, blocks of consecutive path coordinates are trimmed to avoid inflating the psi distance. Default: FALSE.
- bandwidth
(required, numeric) Size of the Itakura parallelogram at both sides of the diagonal used to constrain the least cost path. Expressed as a fraction of the number of matrix rows and columns. Unrestricted by default.
See also
Other Rcpp_dissimilarity_analysis:
null_psi_dynamic_time_warping_cpp()
,
null_psi_lock_step_cpp()
,
psi_equation_cpp()
,
psi_lock_step_cpp()