code_3.py 213 字节
Newer Older
ToTensor's avatar
ToTensor 已提交
1 2 3
from sklearn.decomposition import PCA # 导入Sklearn中decomposition模块的PCA工具
X = x_load.reshape((len(x_load), -1)) # Reshaple张量X
n_components = 5 # 设定因子个数, 因子越多, 模型越复杂