How to find the equation of a 2D plane that best fits a set of vectors defined in n dimensions?

16 ビュー (過去 30 日間)
I have several vectors defined in 6 dimensions that should all lie on the surface of a 2D plane.
I know that the plane can be readily defined using any two vectors in the plane that are not colinear, these two vectors should span the subspace defined by the plane. However, the vectors all have some amount of noise (as they are determined through an experimental procedure). Therefore I'm looking to find the best fitting plane, that best describes all of the vectors, rather than just picking any two.
I think that the plane should either be defined by a vector equation, or by a system of linear equations. I think the latter system should consist of 4 equations in order to entirely constraint the subspace into 2 dimensions (which should be the case, since it is a 2D plane we are finding).
I'm struggling to do this. Does anyone have any ideas? Thanks for your help!
  2 件のコメント
Swastik Sarkar
Swastik Sarkar 2024 年 10 月 21 日
Hi @Rahul,
For determining the best plane of fit for vectors, mean-centering the data followed by applying singular value decomposition (SVD) can work. This approach identifies the plane that optimally fits the given vectors. The process is detailed in the following MATLAB Answer:
Rahul
Rahul 2024 年 10 月 24 日 19:32
Excellent, thank you! This was perfect.

サインインしてコメントする。

採用された回答

Torsten
Torsten 2024 年 10 月 21 日
  1 件のコメント
Rahul
Rahul 2024 年 10 月 24 日 19:33
Thanks for this. I ended up using SVD instead of PCA. I think, in the use case that I'm describing, either procedure should be fine.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by