Skip to content

Instantly share code, notes, and snippets.

@RyotaBannai
Created December 19, 2018 16:50
Show Gist options
  • Select an option

  • Save RyotaBannai/29186a47bcc77fc37bd1281886c5a91f to your computer and use it in GitHub Desktop.

Select an option

Save RyotaBannai/29186a47bcc77fc37bd1281886c5a91f to your computer and use it in GitHub Desktop.
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