Skip to content

Instantly share code, notes, and snippets.

@gabriel19913
Created November 26, 2019 17:41
Show Gist options
  • Save gabriel19913/ff497832bf429531e99fc385c93169bd to your computer and use it in GitHub Desktop.
Save gabriel19913/ff497832bf429531e99fc385c93169bd to your computer and use it in GitHub Desktop.
from sklearn.decomposition import PCA
pca = PCA(15, random_state = seed)
pca.fit(scaled_X)
variance = pca.explained_variance_ratio_
var=np.cumsum(np.round(pca.explained_variance_ratio_, decimals=7)*100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment