dis_qcd {mlmts} | R Documentation |
Constructs a pairwise distance matrix based on the quantile cross-spectral density (QCD)
Description
dis_qcd
returns a pairwise distance matrix based on the
dissimilarity introduced by Lopez-Oriona and Vilar (2021).
Usage
dis_qcd(X, levels = c(0.1, 0.5, 0.9), freq = NULL, features = FALSE, ...)
Arguments
X |
A list of MTS (numerical matrices). |
levels |
The set of probability levels. |
freq |
Vector of frequencies in which the smoothed CCR-periodograms
must be computed. If |
features |
Logical. If |
... |
Additional parameters for the function. See |
Details
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_{QCF}(\boldsymbol X_T, \boldsymbol Y_T)=\Bigg[\sum_{j_1=1}^{d}\sum_{j_2=1}^{d}\sum_{i=1}^{r}
\sum_{i'=1}^{r}\sum_{k=1}^{K}\Big(\Re\big({\widehat G_{j_1,j_2}^{\boldsymbol X_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}\big)
-\Re\big({\widehat G_{j_1,j_2}^{\boldsymbol Y_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})\big)}\Big)^2+
\sum_{j_1=1}^{d}\sum_{j_2=1}^{d}\sum_{i=1}^{r}\sum_{i'=1}^{r}\sum_{k=1}^{K}\Big(\Im\big({\widehat G_{j_1,j_2}
^{\boldsymbol X_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}\big)
-\Im\big({\widehat G_{j_1,j_2}^{\boldsymbol Y_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})\big)}\Big)^2\Bigg]^{1/2},
where {\widehat G_{j_1,j_2}^{\boldsymbol X_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}
and
{\widehat G_{j_1,j_2}^{\boldsymbol Y_T}(\omega_{k}, \tau_{i}, \tau_{i^ {\prime}})}
are estimates of the quantile cross-spectral densities (so-called smoothed CCR-periodograms)
with respect to the variables j_1
and j_2
and probability levels \tau_i
and \tau_{i^\prime}
for
series \boldsymbol X_T
and \boldsymbol Y_T
, respectively, and \Re(\cdot)
and \Im(\cdot)
denote the real part and imaginary part operators, respectively.
Value
If features = FALSE
(default), returns a distance matrix based on the distance d_{QCD}
. 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_{QCF}
.
Author(s)
Ángel López-Oriona, José A. Vilar
References
Lopez-Oriona A, Vilar JA (2021). “Quantile cross-spectral density: A novel and effective tool for clustering multivariate time series.” Expert Systems with Applications, 185, 115677.
See Also
Examples
toy_dataset <- AtrialFibrillation$data[1 : 4] # Selecting the first 4 MTS from the
# dataset AtrialFibrillation
distance_matrix <- dis_qcd(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_qcd
distance_matrix <- dis_qcd(toy_dataset, levels = c(0.4, 0.8)) # Changing
# the probability levels to compute the QCD-based estimators
distance_matrix <- dis_qcd(toy_dataset, freq = 0.5) # Considering only
# a single frequency for the computation of d_qcd
feature_dataset <- dis_qcd(toy_dataset, features = TRUE) # Computing
# the corresponding dataset of features