angle: Standardised last principal angle

Description Usage Arguments Details Value Author(s) References Examples

Description

Standardised last principal angle between the subspaces generated by the columns of A and B.

Usage

1
angle(A, B)

Arguments

A

Numeric matrix of size p by k.

B

Numeric matrix of size q by l.

Details

We compute the last principal angle between the subspaces generated by the columns of A and B using the algorithm in Bjorck and Golub (1973). This angle takes values between 0 and π/2. We divide it by π/2 to make it take values between 0 and 1, where 0 indicates that the subspaces are close.

Value

Standardised last principal angle between A and B.

Author(s)

Tom Reynkens

References

Bjorck, A. and Golub, G. H. (1973), “Numerical Methods for Computing Angles Between Linear Subspaces," Mathematics of Computation, 27, 579–594.

Examples

1
2
3
4
5
6
tmp <- dataGen(m=1)

P <- eigen(tmp$R)$vectors[,1:2]
PP <- rospca(tmp$data[[1]], k=2)$loadings

angle(P, PP)

Example output

[1] 0.1281981

rospca documentation built on May 2, 2019, 1:42 p.m.

Related to angle in rospca...