import numpy as np
from sklearn.decomposition import PCA
x = np.array([
[1,2,3,4,5,6],
[1,2,3,4,5,56],
[3,4,2,34,5,5],
])
pca = PCA(n_components=2)
pca.fit(x)
new_x = pca.transform(x)
print(new_x)
Python PCA降维小例子
最新推荐文章于 2022-08-10 13:13:15 发布