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_{PCA}(\boldsymbol X_{T}, \boldsymbol Y_{T})=1-S_{PCA}
(\boldsymbol X_{T}, \boldsymbol Y_{T})\), with
$$S_{PCA}(\boldsymbol X_{T}, \boldsymbol Y_{T})=\frac{\sum_{i=1}^{k}\sum_{j=1}^{k}
(\lambda^i_{\boldsymbol X_T}
\lambda^j_{\boldsymbol Y_T})\cos^2 \theta_{ij}}{\sum_{i=1}^{k}
\lambda^i_{\boldsymbol X_T} \lambda^i_{\boldsymbol Y_T}},$$
where \(\theta_{ij}\) is the angle between the \(i\)th eigenvector of
\(\boldsymbol X_{T}\) and the \(j\)th eigenvector of series \(\boldsymbol Y_{T}\),
respectively, and \(\lambda^i_{\boldsymbol Y_T}\) and \(\lambda^i_{\boldsymbol Y_T}\)
are the \(i\)th eigenvalues of \(\boldsymbol X_{T}\) and the
\(j\)th eigenvalues of series \(\boldsymbol Y_{T}\) respectively.