# why the coefficient of case 2 is 2 columns, not 5 columns? (about coefficient value of PCA)

2 ビュー (過去 30 日間)
HYUN SEOK 2022 年 12 月 5 日
コメント済み: HYUN SEOK 2022 年 12 月 7 日
(1) Case 1
[coeff] = pca(rand(5,3))
coeff = 3×3
0.7120 -0.5694 -0.4109 0.6460 0.3020 0.7010 0.2750 0.7646 -0.5829
(2) Case 2
[coeff] = pca(rand(5,3)')
coeff = 5×2
-0.0054 0.1255 -0.4611 0.2098 -0.1677 0.8905 -0.5702 -0.3811 0.6588 0.0448
why the coefficient of case 2 is 2 columns, not 5 columns?

サインインしてコメントする。

### 採用された回答

Jon 2022 年 12 月 5 日

By default pca gives the 'economy' option which only includes significant components. for pca(X) with X n by p using 'economy' false will give a p by p coefficient matrix as you expected
[coeff] = pca(rand(5,3)','economy',false)
coeff =
-0.4049 -0.1882 0.5939 -0.5462 0.3867
-0.5332 0.5469 -0.2904 0.2565 0.5162
0.3748 0.7458 0.5429 -0.0101 -0.0925
-0.1896 -0.2715 0.5169 0.7893 -0.0096
0.6126 -0.1887 -0.0324 0.1128 0.7585
##### 1 件のコメント表示非表示 なし
HYUN SEOK 2022 年 12 月 7 日
Thanks a lot

サインインしてコメントする。

### カテゴリ

Find more on Dimensionality Reduction and Feature Extraction in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by