Why I'm getting different result while performing PCA with pca and princomp?

[c,s,l] = princomp(x);
[c,s,l] = pca(X);
% First Command returns with complete i*j but Second returns i*(j-1).

Réponses (1)

Hi Hitesh,
I understand that you are facing issues with PCA and PRINCOMP.
  • Use pca: It is the recommended method for PCA in MATLAB, offering better performance and more options.
  • Check Data: Ensure your data is well-prepared and free of NaNs unless you are using options to handle them.
  • Understand Output: Be aware of the default behavior regarding the number of components returned, and adjust using options if necessary.

Catégories

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

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

Start Hunting!

Translated by