Size of coeff in PCA example is not correct

조회 수: 5 (최근 30일)
Nasri Balit
Nasri Balit 2020년 9월 30일
답변: Raunak Gupta 2020년 10월 3일
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?

답변 (1개)

Raunak Gupta
Raunak Gupta 2020년 10월 3일
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.

카테고리

Help CenterFile Exchange에서 Dimensionality Reduction and Feature Extraction에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by