Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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