The ``dsp()'' function calculates the distance between two subspaces, which are spanned by the columns of two matrices.
dsp(A, B)Outputs are the following scale values.
One mines the trace correlation. That is, \(r=1-\gamma\)
One mines the vector correlation. That is, \(q=1-\theta\)
A matrix with dimension p-by-d.
A matrix with dimension p-by-d.
Let A and B be two full rank matrices of size \(p \times q\). Suppose \(\mathcal{S}(\textbf{A})\) and \(\mathcal{S}(\textbf{B})\) are the column subspaces of matrices A and B, respectively. And, let \(\lambda_i\) 's with \(1 \geq \lambda_1^2 \geq \lambda_2^2 \geq,\cdots,\lambda_p^2\geq 0\), be the eigenvalues of the matrix \(\textbf{B}^T\textbf{A}\textbf{A}^T\textbf{B}\).
1.Trace correlation, (Hotelling, 1936): $$\gamma=\sqrt{\frac{1}{p}\sum_{i=1}^{p}\lambda_i^2}$$
2.Vector correlation, (Hooper, 1959): $$\theta=\sqrt{\prod_{i=1}^{p}\lambda_i^2}$$
Hooper J. (1959). Simultaneous Equations and Canonical Correlation Theory. Econometrica 27, 245-256.
Hotelling H. (1936). Relations Between Two Sets of Variates. Biometrika 28, 321-377.