dis_lpp {mlmts}R Documentation

Constructs a pairwise distance matrix based on locality preserving projections (LPP)

Description

dis_lpp returns a pairwise distance matrix based on the dissimilarity introduced by Weng and Shen (2008).

Usage

dis_lpp(X, approach = 1, k = 2, t = 1, features = FALSE)

Arguments

X

A list of MTS (numerical matrices).

approach

Parameter indicating whether the feature vector representing each MTS is constructed by means of Li's first (approach=1, default) or Li's second (approach=2) approach.

k

Number of neighbors determining the construction of the local structure matrix \boldsymbol S.

t

Parameter determining the construction of the local structure matrix \boldsymbol S (denominator in the exponential transformation).

features

Logical. If features = FALSE (default), a distance matrix is returned. Otherwise, the function returns a dataset of feature vectors.

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_{LPP}(\boldsymbol X_T, \boldsymbol Y_T)= \big| \big| {\boldsymbol \varphi^{\boldsymbol X_T} \boldsymbol A_{LPP} - \boldsymbol \varphi^{\boldsymbol Y_T} \boldsymbol A_{LPP}} \big| \big|,

where \boldsymbol \varphi^{\boldsymbol X_T} and \boldsymbol \varphi^{\boldsymbol Y_T} are the feature vectors constructed from Li's first (approach=1) or Li's second (approach=2) approach with respect to series \boldsymbol X_T and \boldsymbol Y_T, respectively and \boldsymbol A_{LPP} is the matrix of locality preserving projections whose columns are eigenvectors solving the generalized eigenvalue problem defined by matrix \boldsymbol S.

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 resulting from applying Li's first (approach=1) or Li's second (approach=2).

Author(s)

Ángel López-Oriona, José A. Vilar

References

Weng X, Shen J (2008). “Classification of multivariate time series using locality preserving projections.” Knowledge-Based Systems, 21(7), 581–587.

Examples

toy_dataset <- AtrialFibrillation$data[1 : 10] # Selecting the first 10 MTS from the
# dataset AtrialFibrillation
distance_matrix <- dis_lpp(toy_dataset) # Computing the pairwise
# distance matrix based on the distance dis_lpp
feature_dataset <- dis_lpp(toy_dataset, features = TRUE) # Computing
# the corresponding dataset of features

[Package mlmts version 1.1.1 Index]