如何在PCA中找到两个主要组件

时间:2018-04-06 09:50:18

标签: python math pca

我有两个数组。它看起来像:

       GarageMudroomLights [kW]  DiningRoomOutlets [kW]
0                      0.001159                0.000000
1                      0.001223                0.000000
2                      0.001281                0.000000
3                      0.001525                0.000000
4                      0.001549                0.000000
5                      0.001490                0.000000
...                         ...                     ...
39796                  0.003750                0.001783
39797                  0.003717                0.001850
39798                  0.003617                0.001867

我需要找到两个正交向量之类的主成分。 我试图用PCA in python得到它,但我无法理解那里的组件在哪里,向量之间的旋转角度(necessary vectors and angle (picture))以及它如何仅与两个数组一起工作。

现在我是标准化阵列,不明白下一步是什么。

import pandas
from sklearn.preprocessing import StandardScaler

s_i_t = pandas.read_csv('dataset.csv', sep=',')
s_i_t_std = StandardScaler().fit_transform(s_i_t)

0 个答案:

没有答案