subspace: The distance between two subspaces.

Description Usage Arguments Value

View source: R/subspace.R

Description

This function calculates the distance between the two subspaces with equal dimensions span(A) and span(B), where A \in R^{p\times u} and B \in R^{p\times u} are the basis matrices of two subspaces. The distance is defined as

\|P_{A} - P_{B}\|_F/√{2d},

where P is the projection matrix onto the given subspace with the standard inner product, and d is the common dimension.

Usage

1
subspace(A, B)

Arguments

A

A p-by-u full column rank matrix.

B

A p-by-u full column rank matrix.

Value

Returns a distance metric that is between 0 and 1


jerryfsu3333/TRES_code documentation built on Nov. 14, 2021, 6:10 p.m.