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.
基本的なプロセス[コードテンプレート]はPCAを達成sklearn
おすすめ
転載: blog.csdn.net/weixin_44680262/article/details/104719149
おすすめ
ランキング