Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ValueError: n_components=1000 must be between 0 and min(n_samples, n_features)=100 with svd_solver='full' #13

Open
krassowski opened this issue Apr 17, 2020 · 1 comment

Comments

@krassowski
Copy link

For a dataset with n_features=1001 and n_samples=999 we will get:

ValueError: n_components=1000 must be between 0 and min(n_samples, n_features)=999 with svd_solver='full'

The default value of preprocess_with_pca_dim causes problems when trying to transform_fit() as:

  1. it cannot be changed (unless manually in fit)
  2. it uses hardcoded 1000 (but when n < p, then SVD will not work), so maybe it could use min(1000, n_samples)
@krassowski
Copy link
Author

And a very interesting idea, btw - thank you for sharing code here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant