[FIX] Test & Learn: do not crash on a data with class only nans#2751
Merged
lanzagar merged 1 commit intobiolab:masterfrom Nov 28, 2017
jerneju:testlearners-nanclass
Merged
[FIX] Test & Learn: do not crash on a data with class only nans#2751lanzagar merged 1 commit intobiolab:masterfrom jerneju:testlearners-nanclass
lanzagar merged 1 commit intobiolab:masterfrom
jerneju:testlearners-nanclass
Conversation
Contributor
Author
Codecov Report
@@ Coverage Diff @@
## master #2751 +/- ##
=========================================
+ Coverage 76.1% 76.1% +<.01%
=========================================
Files 338 338
Lines 59760 59770 +10
=========================================
+ Hits 45479 45488 +9
- Misses 14281 14282 +1 |
markotoplak
reviewed
Nov 10, 2017
| if data: | ||
| data = HasClass()(data) | ||
| if not len(data): | ||
| data = None |
Member
There was a problem hiding this comment.
Is the warning still OK in this case? I do not know what it is, but we need to show clearly that nothing can get computed.
Contributor
Author
There was a problem hiding this comment.
When there is no target variable it shows an error: "Train data input requires a target variable." and now where there is a target variable with only nan values it shows a warning: "Instances with unknown target values were removed from train data.".
What would be the best error / warning message?
Contributor
Author
There was a problem hiding this comment.
@markotoplak : Now I fixed it in a different way.
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.
Issue
Widget Test & Learn crashes when receives data with a class which has only
nanvalues. This is because all data is removed andTablesuddenly has length0.Description of changes
The data is set to
Nonewhen its length is0.Includes