Learn R Programming

distantia (version 2.0.2)

auto_sum_full_cpp: (C++) Sum Distances Between All Consecutive Samples in Two Time Series

Description

Computes the cumulative auto sum of autodistances of two time series. The output value is used as normalization factor when computing dissimilarity scores.

Usage

auto_sum_full_cpp(x, y, distance = "euclidean")

Value

numeric

Arguments

x

(required, numeric matrix) univariate or multivariate time series.

y

(required, numeric matrix) univariate or multivariate time series with the same number of columns as 'x'.

distance

(optional, character string) distance name from the "names" column of the dataset distances (see distances$name). Default: "euclidean"

See Also

Other Rcpp_auto_sum: auto_distance_cpp(), auto_sum_cpp(), auto_sum_path_cpp(), subset_matrix_by_rows_cpp()

Examples

Run this code
#simulate two time series
x <- zoo_simulate(seed = 1)
y <- zoo_simulate(seed = 2)

#auto sum
auto_sum_full_cpp(
  x = x,
  y = y,
  distance = "euclidean"
)

Run the code above in your browser using DataLab