dis_2dsvd | R Documentation |
dis_2dsvd
returns a pairwise distance matrix based on the 2dSVD
distance measure proposed by \insertCiteweng2008classification;textualmlmts.
dis_2dsvd(X, var_u = 0.9, var_v = 0.9, features = FALSE)
X |
A list of MTS (numerical matrices). |
var_u |
Rate of retained variability concerning the row-row covariance matrix. |
var_v |
Rate of retained variability concerning the column-column covariance matrix. |
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_{2dSVD}(\boldsymbol X_T, \boldsymbol Y_T)=\sum_{b=1}^s||{\boldsymbol M}^{\boldsymbol X_T}_{\bullet, b}-
{\boldsymbol M}^{\boldsymbol Y_T}_{\bullet, b}||,
where {\boldsymbol M}^{\boldsymbol X_T}_{\bullet, b}
and {\boldsymbol M}^{\boldsymbol Y_T}_{\bullet, b}
are the
b
th columns of matrices {\boldsymbol M}^{\boldsymbol X_T}
and {\boldsymbol M}^{\boldsymbol Y_T}
, which are obtained by
decomposing the time series \boldsymbol X_T
and \boldsymbol Y_T
, respectively,
by means of the 2dSVD procedure (average row-row and column-column covariance matrices
are taken into account), and s
is the number of first retained eigenvectors
concerning the average column-column covariance matrices.
If features = FALSE
(default), returns a distance matrix based on the distance d_{2dSVD}
. 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_{2dSVD}
.
Ángel López-Oriona, José A. Vilar
weng2008classificationmlmts
toy_dataset <- BasicMotions$data[1 : 10] # Selecting the first 10 MTS from the
# dataset BasicMotions
distance_matrix <- dis_2dsvd(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_2dsvd
feature_dataset <- dis_2dsvd(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.