TST Extend tests for scipy.sparse/*array in sklearn/feature_extraction/tests/test_text#27219
Merged
glemaitre merged 8 commits intoscikit-learn:mainfrom Sep 14, 2023
Merged
Conversation
scipy.sparse/*array in sklearn/feature_extraction/textscipy.sparse/*array in sklearn/feature_extraction/tests/test_text
work-mohit
reviewed
Aug 30, 2023
Contributor
work-mohit
left a comment
There was a problem hiding this comment.
Try these changes, and I'm not sure about the changes in the text.py file, you can check with/ without them.
Contributor
Author
I think this test is testing csr results against csc? Or did I miss anything in your suggestion? |
glemaitre
reviewed
Sep 13, 2023
glemaitre
approved these changes
Sep 13, 2023
Member
glemaitre
left a comment
There was a problem hiding this comment.
LGTM up to the point that the CIs are passing.
Thanks @Charlie-XIAO
Member
|
@OmarManzoor I think this one is correct. The sphinx error should not be a big deal. I assume that it will not happen in |
REDVM
pushed a commit
to REDVM/scikit-learn
that referenced
this pull request
Nov 16, 2023
…tion/tests/test_text` (scikit-learn#27219) Co-authored-by: Guillaume Lemaitre <g.lemaitre58@gmail.com> Co-authored-by: Omar Salman <omar.salman@arbisoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Towards #27090.
There is a test case failing originally, i.e.,
test_tfidf_transformer_sparse. This is because sparse arrays, being multiplied with whatever, raises if they have inconsistent shape (even if dimensions match). I'm not sure if the class does not support sparse arrays (so that I should remove the test parametrization), or it's something else that went wrong (I'm not familiar with (and in fact have never used) sparse arrays).Currently I'm replacing
x*ywith(y.T*x.T).Tbut this is definitely not the final solution. Please let me know how I should deal with this.