-
-
Notifications
You must be signed in to change notification settings - Fork 26.4k
MRG re-allow zero-based indexes in SVMlight files #756
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
Conversation
|
Looks good, but could you please add a test for the case where |
|
It fails with a |
|
Indeed. Thanks for the test however I don't see it in the github PR view. Are you sure the push occurred? Other than that 👍 for merging. BTW, have you tried on the adult dataset to check whether it fixes @mblondel's issue? |
|
Oops, pushed it to my master branch. The updated commit is there now. And yes, I tried it on the adult dataset, both |
|
Thanks for the quick fix! |
|
Is that a green light for the green button? |
|
|
I can imagine a case where a test set has an all-zero first column. Loading that with |
I really want load_svmlight_files to support the auto mode because I use |
I can do that tomorrow and send you a PR. |
|
I imagined it wouldn't matter; |
|
But the original reason you wanted to fix that is because the shape was |
|
You mean the previous time I "fixed" this? Yes, but I thought the convention was one-based indexing since all the LibSVM datasets do that. This PR makes it possible to use both conventions, but the default settings are designed for safety rather than efficiency/elegance. |
|
@mblondel: I implemented |
|
@larsmans: Thanks a ton. Looks good to me. Sorry for not doing myself, this has been a very busy week for me. |
|
Maybe add a couple of new test to highlight the differences when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PEP8
|
Maybe I missed something but is there now a way to ensure that training and test file are read in a consistent way with "auto" if one of them contains a column of zeros? |
|
Added a test for |
|
@amueller: sorry, didn't see that last comment. In |
|
Cool. Could you add a comment to |
|
Done! |
|
👍 for merge |
|
👍 for merge as well |
|
Alright @larsmans. After this one you still have 4 pending PRs to merge :) |
MRG re-allow zero-based indexes in SVMlight files
Fixes issue #750.