我通过以下方式进行了一些PCA分析:https://jotterbach.github.io/2016/03/24/Principal_Component_Analysis/
但是当我创建PCA图时,图例有问题:
plt.semilogy(pca_1.explained_variance_ratio_, '--o')
plt.semilogy(pca_1.explained_variance_ratio_.cumsum(), '--o')
version, slope is much smaller
plt.xlabel('Principle Component')
plt.ylabel('Explained Variance')
plt.legend('Explained Variance b')
图例名称仅用于实验,不知道为什么它只能显示第一个字母,有人可以帮助我吗?非常感谢。