-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Support sparse input in interfaces_getitem when num_best is not None #1294
Comments
@tmylk I am interested in working on the issue. We basically have to add a check for |
@souravsingh Need to add a new code path when num_best is not None and input is sparse |
@tmylk I have fixed this issue and am submitting a PR for the same. Instead of having a separate code path for sparse input and num_best not None, I have added another function, any2sparse_clipped() in matutils and replaced full2sparse_clipped with this function in interfaces. |
…one. Fix #1294 (#1321) * added any2sparse_clipped() function * changed full2sparse_clipped to any2sparse_clipped in __getitem__ * added missing whitespace * return topn from any2sparse_clipped() * efficient any2sparse_clipped implementation * added unit test for any2sparse_clipped * function call corrected * removed any2sparse_clipped and added scipy2scipy_clipped * added new code path for maintain_sparsity * added unit tests for new function and issue * fixed flake8 errors * fixed matrix_indptr * added requested changes * replaced hasattr with getattr * call abs() once for entire matrix in scipy2scipy_clipped * removed matrix.sort_indices and removed indptr while calling argsort
…one. Fix piskvorky#1294 (piskvorky#1321) * added any2sparse_clipped() function * changed full2sparse_clipped to any2sparse_clipped in __getitem__ * added missing whitespace * return topn from any2sparse_clipped() * efficient any2sparse_clipped implementation * added unit test for any2sparse_clipped * function call corrected * removed any2sparse_clipped and added scipy2scipy_clipped * added new code path for maintain_sparsity * added unit tests for new function and issue * fixed flake8 errors * fixed matrix_indptr * added requested changes * replaced hasattr with getattr * call abs() once for entire matrix in scipy2scipy_clipped * removed matrix.sort_indices and removed indptr while calling argsort
Sparse input is ony supported when num_best=None, otherwise errors.
Raised on the mailing list https://groups.google.com/d/msg/gensim/-PhUHorj9-E/N6apxcqnHQAJ
returns
The text was updated successfully, but these errors were encountered: