Learn R Programming

sSDR (version 1.2.0)

disvm: Subspace distance

Description

Subspace distance

Usage

disvm(v1, v2)

Arguments

v1
A matrix, each column consists of a p-dimensional vector.
v2
A matrix, each column consists of a p-dimensional vector.

Value

A scaler represents the distance between the two spaces spanned by v1 and v2 respectively.

Details

This function computes the distances between two spaces using the formulation in Li, Zha, Chiaromonte (2005), which is the Frobenius norm of the difference between the two orthogonal projection matrices defined by v1 and v2.

References

Li, B., Zha, H., and Chiaromonte, F. (2005). Contour regression: a general approach to dimension reduction. Annals of Statistics, 33(4):1580-1616.

Examples

Run this code
v1 <- c(1, 0, 0)
v2 <- c(0, 1, 0)
disvm(v1, v1)
disvm(v1, v2)

Run the code above in your browser using DataLab