Effacer les filtres
Effacer les filtres

what is the difference between pca(x) and princomp(x) matlab commands?

7 vues (au cours des 30 derniers jours)
Mohamed Moawed
Mohamed Moawed le 3 Juin 2013
could any one help me the difference between pca(x) and princomp(x) matlab commands?

Réponse acceptée

Tom Lane
Tom Lane le 3 Juin 2013
Modifié(e) : Tom Lane le 6 Juin 2013
If you type "type princomp" you will see that it is just a call to pca with certain default inputs defined. The pca function was introduced just in an attempt to have a more familiar name.
  2 commentaires
Mohamed Moawed
Mohamed Moawed le 4 Juin 2013
thanks for your reply. i want to ask is the input of the princomp is input matrix or covariance matrix? ans what about pca function is input matrix or covariance matrix?
Tom Lane
Tom Lane le 5 Juin 2013
Modifié(e) : Tom Lane le 6 Juin 2013
Use pcacov if you have the covariance matrix. The others expect the data matrix.

Connectez-vous pour commenter.

Plus de réponses (1)

Andrea Le
Andrea Le le 26 Nov 2013
Besides from what Tom said, I want to add other difference between these two commands princomp lets you decide to do an economic version of the outputs. pca automatically truncates your matrix into an economic version.
  1 commentaire
Imad Ahmed Tungekar
Imad Ahmed Tungekar le 29 Nov 2017
could you please elaborate what is economic version of the output?

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by