dis_swmd | R Documentation |
dis_swmd
returns a pairwise distance matrix based on variable-based
principal component analysis (VPCA) and a spatial weighted matrix distance
(SWMD) \insertCitehe2018unsupervisedmlmts.
dis_swmd(X, var_rate = 0.9, features = FALSE)
X |
A list of MTS (numerical matrices). |
var_rate |
Rate of retained variability concerning the dimensionality-reduced MTS samples (default is 0.90). |
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_{SWMD}(\boldsymbol X_T, \boldsymbol Y_T)=\Big[\big(vec
(\boldsymbol Z^{\boldsymbol X_T})-vec(\boldsymbol Z^{\boldsymbol Y_T})\big)\boldsymbol
S\big(vec(\boldsymbol Z^{\boldsymbol X_T})-vec(\boldsymbol Z^{\boldsymbol Y_T})\big)^\top\Big]^{1/2},
where \boldsymbol Z^{\boldsymbol X_T}
and \boldsymbol Z^{\boldsymbol Y_T}
are the dimensionality-
reduced MTS samples associated with \boldsymbol X_T
and
\boldsymbol Y_T
, respectively, the operator vec(\cdot)
creates a vector by concatenating the columns of the matrix received as input
and \boldsymbol S
is a matrix integrating the spatial dimensionality
difference between the corresponding elements.
If features = FALSE
(default), returns a distance matrix based on the distance d_{SWMD}
. 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_{SWMD}
.
Ángel López-Oriona, José A. Vilar
he2018unsupervisedmlmts
vpca_clustering
toy_dataset <- AtrialFibrillation$data[1 : 10] # Selecting the first 10 MTS from the
# dataset AtrialFibrillation
distance_matrix <- dis_swmd(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_swmd
feature_dataset <- dis_swmd(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.