Fix Learner._check_input_formatting() for dense feature sets. - #658
Merged
desilinguist merged 4 commits intoFeb 3, 2021
Merged
Conversation
- Right now, this method basically assumes that all featuresets will be sparse and hence uses the `.data` attribute to get a flattened version of the feature array. However, this will not work for featuresets with dense feature arrays. To handle those, we need to use the `.flat` iterator that is available for dense arrays.
Codecov Report
@@ Coverage Diff @@
## main #658 +/- ##
==========================================
+ Coverage 95.06% 95.09% +0.03%
==========================================
Files 27 27
Lines 3098 3101 +3
==========================================
+ Hits 2945 2949 +4
+ Misses 153 152 -1
Continue to review full report at Codecov.
|
aoifecahill
approved these changes
Feb 3, 2021
mulhod
approved these changes
Feb 3, 2021
delete-merged-branch
Bot
deleted the
656-fix-check-input-formatting-for-dense-featuresets
branch
February 3, 2021 21:20
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.
This PR closes #656.
.dataattribute to get a flattened version of the feature array. However, this does not work for featuresets with dense feature arrays (see the issue for a detailed description of the problem)..flatattribute that returns a 1-dimensional iterator over the dense array.