呼び出し手順
[facpr,comprinc,lambda,tsquare, explained, mu] = princomp(x,eco)
パラメータ
- x
n行p列 (n個の独立変数,p個の変数)の実数行列です.- eco
論理値, 小さな大きさの特異値分解を可能とするために使用されます.
- facpr
p行p列の行列. 主成分を有します: 相関行列Vの固有ベクトル.- comprinc
n行p列の行列. 主成分を有します.この行列の各列は,M個の主軸への個々の直交投影です. この列の各々は, 条件u'_i M^(-1) u_i=1の下で分散を最大化する 変数x1, ...,xpの線形結合です.- lambda
p列ベクトルです.Vの固有値を有します. ただし,Vは相関行列です.- tsquare
n列ベクトル. 各データ点に関するHotellingのT^2統計量を有します.- explained
a column vector of length "number of components". The percentage of variance explained by each principal component.
- mu
a row vector of length
p. The estimated mean of each variable ofx.
説明
この関数は,n行p列の
データ行列xで
"主成分解析"を行ないます.
この手法の背後のアイデアは, n個独立変量からなるクラスタを より小さな次元の部分空間に 近似的な手法で表すことです. これを行うために, この手法はクラスタを部分空間に投影します. k次元投影部分区間の選択は, 投影の距離が最小のゆがみを有するように行われます: 投影の距離の平方が最大化されるような k次元部分空間を探します(実際には投影では距離は伸ばすことのみできます). 言い換えると, 投影のk次元部分空間への投影の慣性は最大化される必要があります.
標準化された変数について主成分解析を計算する際に,
princomp(wcenter(x,1))またはpca関数を使用することができます.
例
a=rand(100,10,'n'); [facpr,comprinc,lambda,tsquare] = princomp(a);
x = [1 2 1;2 1 3; 3 2 3] [facpr, comprinc, lambda, tsquare, explained, mu] = princomp(x, %t); comprinc * facpr' + ones(3, 1) * mu // == x
参考文献
Saporta, Gilbert, Probabilités, Analyse des Données et Statistique, Editions Technip, Paris, 1990.
History
| バージョン | 記述 |
| 2024.1.0 | princomp now returns the percentage of the variance explained by each principal component and
the estimated mean of each variable of x. |
| 2025.0.0 | Tagged obsolete and will be removed in Scilab 2026.0.0. |
| Report an issue | ||
| << pca | Multivariate - regress correl PCA | reglin >> |