Created
July 16, 2019 12:16
-
-
Save KhyatiMahendru/e2373209e01d50a8096753deabd38fbb 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 | |
// say you want to reduce to 2 features | |
svd = TruncatedSVD(n_features = 2) | |
//obtain the transformed data | |
data_transformed = svd.fit_transform(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment