Created
December 19, 2018 16:51
-
-
Save RyotaBannai/0522c9c0673a0c61aef7581f4019b6eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pca = PCA().fit(digits.data) # Blank inside the closed bracket | |
plt.plot(np.cumsum(pca.explained_variance_ratio_),'o-', c='#663399', alpha=.5) | |
plt.xlabel('Number of components') | |
plt.ylabel('Cumulative explained variance') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment