A question for principal components analysis (pca)
5 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Daniel Chou
il 15 Feb 2021
Risposto: Gaurav Garg
il 22 Feb 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
0 Commenti
Risposta accettata
Gaurav Garg
il 22 Feb 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))
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Dimensionality Reduction and Feature Extraction in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!