Size of coeff in PCA example is not correct

5 visualizaciones (últimos 30 días)
Nasri Balit
Nasri Balit el 30 de Sept. de 2020
Respondida: Raunak Gupta el 3 de Oct. de 2020
Following the demo code for pca exactly gives a different coeff result.
Expected result:
My result:
I have no idea what could be causing this... Any ideas?

Respuestas (1)

Raunak Gupta
Raunak Gupta el 3 de Oct. de 2020
Hi,
The vector you are seeing in your result is the component wise variance of each principal component. I tried the same example and coeff variable is a 4x4 matrix for me.
Can you try with full syntax which is mentioned below:
[coeff,score,latent] = pca(ingredients)
This should give correct result.

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