Created
March 18, 2021 10:54
-
-
Save cydal/b9e895e67bdae383f7a7ca648de50236 to your computer and use it in GitHub Desktop.
This file contains 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
from sklearn.decomposition import TruncatedSVD | |
for i in range(1100, 3000, 100): | |
lsa = TruncatedSVD(n_components=i, n_iter=10, random_state=42) | |
lsa.fit(x_transformed) | |
print("Num components - ", i, " ", lsa.explained_variance_ratio_.sum()) | |
lsa = TruncatedSVD(n_components=2800, n_iter=10, random_state=42) | |
lsa.fit(x_transformed) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment