dis_gcc | R Documentation |
dis_gcc
returns a pairwise distance matrix based on the generalized
cross-correlation measure introduced by \insertCitealonso2019clustering;textualmlmts.
dis_gcc(X, lag_max = 1, features = FALSE)
X |
A list of MTS (numerical matrices). |
lag_max |
The maximum lag considered to compute the generalized cross-correlation. |
features |
Logical. If |
Given a collection of MTS, the function returns the pairwise distance matrix,
where the distance between two MTS \boldsymbol X_T
and \boldsymbol Y_T
is defined
as
d_{GCC}(\boldsymbol X_T, \boldsymbol Y_T)=\Bigg[\sum_{j_1,j_2=1, j_1 \ne j_2}^{d}
\bigg(\widehat{GCC}(\boldsymbol X_{T,j_1}, \boldsymbol X_{T,j_2} )-\widehat{GCC}(\boldsymbol Y_{T,j_1},\boldsymbol Y_{T,j_2})\bigg)^2\Bigg]^{1/2},
where \boldsymbol X_{T,j}
and \boldsymbol Y_{T,j}
are the j
th dimensions (univariate time series) of
\boldsymbol X_T
and \boldsymbol Y_T
, respectively, and \widehat{GCC}(\cdot, \cdot)
is the estimated genelarized cross-correlation
measure between univariate series proposed by \insertCitealonso2019clustering;textualmlmts.
If features = FALSE
(default), returns a distance matrix based on the distance d_{GCC}
. Otherwise, the function
returns a dataset of feature vectors, i.e., each row in the dataset contains the features employed to compute the
distance d_{GCC}
.
Ángel López-Oriona, José A. Vilar
alonso2019clusteringmlmts
toy_dataset <- AtrialFibrillation$data[1 : 10] # Selecting the first 10 MTS from the
# dataset AtrialFibrillation
distance_matrix <- dis_gcc(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_cor
feature_dataset <- dis_gcc(toy_dataset, features = TRUE) # Computing
# the corresponding dataset of features
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.