subspacea - Angles between subspaces

版本 4.6 (11.9 KB) 作者: Andrew Knyazev
Angles between subspaces and canonical correlations in general scalar products.
3.9K 次下载
更新时间 2021/12/20

查看许可证

subspacea(F,G,A) Finds all min(size(orth(F),2),size(orth(G),2)) principal angles between two subspaces spanned by the columns of matrices F and G in the A-based scalar product x'*A*y, where A is Hermitian and positive definite. COS of principal angles is called canonical correlations in statistics.
The input A can be provided as a matrix as well as a string of a function name, e.g., funcA giving the product funcA(X) = A*X.
[theta,U,V] = subspacea(F,G,A) also computes left and right principal (canonical) vectors - columns of U and V, respectively.
If F and G are vectors of unit length and A=I, the angle is ACOS(F'*G) in exact arithmetic. If A is not provided as a third argument, than A=I and the function gives the same largest angle as SUBSPACE.m by Andrew Knyazev. MATLAB's SUBSPACE.m function is still badly designed and fails to compute some angles accurately.
The algorithm is described in A. V. Knyazev and M. E. Argentati, Principal Angles between Subspaces in an A-Based Scalar Product: Algorithms and Perturbation Estimates. SIAM J. Scientific Computing, 23 (2002), no. 6, 2009-2041. http://dx.doi.org/10.1137/S1064827500377332

引用格式

Andrew Knyazev (2024). subspacea - Angles between subspaces (https://www.mathworks.com/matlabcentral/fileexchange/55-subspacea-angles-between-subspaces), MATLAB Central File Exchange. 检索来源 .

Knyazev, Andrew V., and Merico E. Argentati. “Principal Angles between Subspaces in an A-Based Scalar Product: Algorithms and Perturbation Estimates.” SIAM Journal on Scientific Computing, vol. 23, no. 6, Society for Industrial & Applied Mathematics (SIAM), Jan. 2002, pp. 2008–40, doi:10.1137/s1064827500377332.

查看更多格式
MATLAB 版本兼容性
创建方式 R2021a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Dimensionality Reduction and Feature Extraction 的更多信息
标签 添加标签
致谢

参考作品: subspace.m, ortha.m

启发作品: subspace.m

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
4.6

Fix error handling, code beautification.

1.2

Updated description.
added a conversion to a toolbox

1.1.0.0

License update to free software (BSD). Comments update.

1.0.0.0

minor update for MATLAB R14