Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created May 9, 2021 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/d8040d155d8cef5dc7daf62c88337678 to your computer and use it in GitHub Desktop.
Save amankharwal/d8040d155d8cef5dc7daf62c88337678 to your computer and use it in GitHub Desktop.
sparse_pca = SparsePCA(n_components=60, alpha=0.1)
sparse_pca.fit_transform(digits.data / 255)
print(sparse_pca.components_.shape)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment