dis_modwt | R Documentation |
dis_modwt
returns a pairwise distance matrix based on the dissimilarity
introduced by \insertCited2012wavelets;textualmlmts.
dis_modwt(X, wf = "d4", J = floor(log(nrow(X[[1]]))) - 1, features = FALSE)
X |
A list of MTS (numerical matrices). |
wf |
The wavelet filter (default is 'd4'). |
J |
The maximum allowable number of scales. |
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_{MODWT}(\boldsymbol X_T, \boldsymbol Y_T)=\Big|||\widehat{\boldsymbol \theta}^{\boldsymbol X_T}_{WV}-
\widehat{\boldsymbol \theta}^{\boldsymbol Y_T}_{WV}||^2+||\widehat{\boldsymbol \theta}^{\boldsymbol X_T}_{WC}-
\widehat{\boldsymbol \theta}^{\boldsymbol Y_T}_{WC}||^2\Big|^{1/2},
where \widehat{\boldsymbol \theta}^{\boldsymbol X_T}_{WV}
and \widehat{\boldsymbol \theta}^{\boldsymbol Y_T}_{WV}
are vectors
containing the estimated wavelet variances within \boldsymbol X_T
and \boldsymbol Y_T
, respectively, and
\widehat{\boldsymbol \theta}^{\boldsymbol X_T}_{WC}
and \widehat{\boldsymbol \theta}^{\boldsymbol Y_T}_{WC}
are vectors
containing the estimated wavelet correlations within \boldsymbol X_T
and \boldsymbol Y_T
, respectively.
If features = FALSE
(default), returns a distance matrix based on the distance d_{MODWT}
. 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_{MODWT}
.
Ángel López-Oriona, José A. Vilar
d2012waveletsmlmts
modwt
toy_dataset <- AtrialFibrillation$data[1 : 10] # Selecting the first 10 MTS from the
# dataset AtrialFibrillation
distance_matrix <- dis_modwt(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_cor
feature_dataset <- dis_modwt(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.