x******a 发帖数: 6336 | 1 【 以下文字转载自 Statistics 讨论区 】
发信人: xiaojiya (xiaojiya), 信区: Statistics
标 题: Re: 请教一个pca的问题
发信站: BBS 未名空间站 (Fri Jul 25 13:29:01 2014, 美东)
thanks, that is what I think. however, I tried the python package sklearn
and statsmodels.sandbox.tools.pca, I got the following result that I don't
understand.
---sklearn-----
pca3.explained_variance_
Out[1001]:
array([ 1.78290607, 1.08429872, 0.42104483, 0.31175038])
---------------
The eigenvalues by statsmodels.sandbox.tools.pca are
array([ 1.98100675, 1.20477635, 0.46782759, 0.34638931])
----------------
the data is:
a b c d
0 0.992009 1.772628e+00 9.369741e-01 1.510715e-01
1 -1.596765 -2.236714e-01 8.703019e-01 1.046825e+00
2 1.064519 -4.164265e-01 -1.728404e+00 -2.151135e+00
3 -1.248263 -7.462143e-01 -5.396282e-01 9.312417e-17
4 0.300384 6.416818e-01 6.970039e-01 1.470260e+00
5 0.000000 6.151180e-18 -1.590554e+00 5.692677e-03
6 1.376652 -7.265441e-01 1.052036e-01 4.298877e-01
7 -0.888537 -6.617251e-02 9.981828e-01 9.312417e-17
8 0.000000 1.315161e+00 2.509203e-01 9.312417e-17
9 0.000000 -1.550441e+00 -6.528411e-17 -9.526020e-01 | k**********g 发帖数: 989 | 2 what is explained_variance_ ? |
|