A question for principal components analysis (pca)

5 ビュー (過去 30 日間)
Daniel Chou
Daniel Chou 2021 年 2 月 15 日
回答済み: Gaurav Garg 2021 年 2 月 22 日
Dear All,
I have a question about principal components analysis.
The scenario is,
I have a ellipsoid with semi major axis (length=1) and two equal length (=0.5) semi minor axes.
Despite I already know the magnitudes of three axes, I would like to try to use the pca command to find the magnitudes of semi_axes as well as the corresponding vectors.
The ellipsoid stl file in attached.
I use the stlread command to read this simple stl file.
Then perform the pca to the vertices.
T=stlread('ell.stl')
[coeff,score,latent,tsquared,explained,mu] =pca(T.Points)
I believe that the ''coeff'' matrix gives me three principal directions (the unit vectors of three semi axes) in terms of column vectors of the ellipsoid.
However, I don't know how to find the ''magnitude of semi axes'' (i.e. max_principal value=1, other tow=0.5) of this ellipsoid from pca data.
After I refer the documentation of pca command, I still fail to find the information could answer my question.
Could anyone give me the hint about it?
Really appreciate for that!!!
Sincerely
Daniel Chou

採用された回答

Gaurav Garg
Gaurav Garg 2021 年 2 月 22 日
Hi Daniel,
plot (score(:,1), score(:,2))
On running the above function, you will find a 2-D ellipse which has magnitude same as the magnitude of the original 3-D ellipsoid.
You can also plot the other principal axis by -
plot (score(:,1), score(:,3))
plot (score(:,3), score(:,2))

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by