基本的なプロセス[コードテンプレート]はPCAを達成sklearn

from sklearn.decomposition import PCA
pca = PCA(n_components=n)  # 指定降维到n维
pca.fit(X)  # 进行降维
print(pca.explained_variance_ratio_)  # Percentage of variance explained by each of the selected components.
print(pca.singular_values_)  # The singular values corresponding to each of the selected components. 
公開された37元の記事 ウォンの賞賛0 ビュー1463

おすすめ

転載: blog.csdn.net/weixin_44680262/article/details/104719149