A question for principal components analysis (pca)

13 visualizaciones (últimos 30 días)
Daniel Chou
Daniel Chou el 15 de Feb. de 2021
Respondida: Gaurav Garg el 22 de Feb. de 2021
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

Respuesta aceptada

Gaurav Garg
Gaurav Garg el 22 de Feb. de 2021
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))

Más respuestas (0)

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by