psi_equation_cpp function

(C++) Equation of the Psi Dissimilarity Score

(C++) Equation of the Psi Dissimilarity Score

Equation to compute the psi dissimilarity score (Birks and Gordon 1985). Psi is computed as ψ=(2a/b)1\psi = (2a / b) - 1, where aa is the sum of distances between the relevant samples of two time series, and bb is the cumulative sum of distances between consecutive samples in the two time series. If a is computed with dynamic time warping, and diagonals are used in the computation of the least cost path, then one is added to the result of the equation above.

psi_equation_cpp(a, b, diagonal = TRUE)

Arguments

  • a: (required, numeric) output of cost_path_sum_cpp() on a least cost path.
  • b: (required, numeric) auto sum of both sequences, result of auto_sum_cpp().
  • diagonal: (optional, logical). Must be TRUE when diagonals are used in dynamic time warping and for lock-step distances. Default: FALSE.

Returns

numeric

See Also

Other Rcpp_dissimilarity_analysis: psi_dtw_cpp(), psi_ls_cpp(), psi_null_dtw_cpp(), psi_null_ls_cpp()

  • Maintainer: Blas M. Benito
  • License: MIT + file LICENSE
  • Last published: 2025-02-01