10000 docstring for `precompute` parameter is incorrect w.r.t. handling of sparse matrices · Issue #19105 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

docstring for precompute parameter is incorrect w.r.t. handling of sparse matrices #19105

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

Closed
amidvidy opened this issue Jan 5, 2021 · 4 comments

Comments

@amidvidy
Copy link
Contributor
amidvidy commented Jan 5, 2021

Describe the issue linked to the documentation

Docstring says that precompute is always True with sparse matrix input to preserve sparsity, but in reality the code always sets precompute to False - which I believe is correct behavior.

Suggest a potential alternative/fix

Correct docstring comment.

@aakashbanerjee98
Copy link

hey can you describe the issue a bit more?

@amidvidy
Copy link
Contributor Author

yes. The comment says that in the event a sparse data matrix is passed to the constructor, the precompute option will be hard-set to true, but in reality (see code i linked above) it treats it as hard-set to False. I think this is just a typo in the comment, since the behavior of not precomputing the full gram matrix for sparse matrixes is likely desirable - much of the computation could be wasted otherwise.

@Vlasovets
Copy link
Contributor

I'm working on it

@cmarmo
Copy link
Contributor
cmarmo commented Feb 4, 2021

Closed in #19348.

@cmarmo cmarmo closed this as completed Feb 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants
0